<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.jboss.da</groupId>
    <artifactId>parent</artifactId>
    <version>3.0.2</version>
  </parent>
  <artifactId>common</artifactId>
  <packaging>jar</packaging>
  <name>common</name>
  <dependencies>
    <dependency>
      <groupId>org.jboss.da</groupId>
      <artifactId>reports-model</artifactId>
    </dependency>

    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-core</artifactId>
    </dependency>

    <dependency>
      <groupId>jakarta.validation</groupId>
      <artifactId>jakarta.validation-api</artifactId>
    </dependency>

    <dependency>
      <groupId>org.jboss.pnc</groupId>
      <artifactId>constants</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.smallrye.config</groupId>
      <artifactId>smallrye-config-source-yaml</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hibernate.validator</groupId>
      <artifactId>hibernate-validator</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>io.smallrye</groupId>
        <artifactId>jandex-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>pl.project13.maven</groupId>
        <artifactId>git-commit-id-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>com.google.code.maven-replacer-plugin</groupId>
        <artifactId>maven-replacer-plugin</artifactId>
        <version>1.4.1</version>
        <configuration>
          <file>src/main/templates/org/jboss/da/common/Constants.java</file>
          <outputFile>src/main/java/org/jboss/da/common/Constants.java</outputFile>
          <replacements>
            <replacement>
              <token>@version.da@</token>
              <value>${project.version}</value>
            </replacement>
            <replacement>
              <token>@version.bc.rest@</token>
              <value>${version.bc.rest}</value>
            </replacement>
            <replacement>
              <token>@version.reports.rest@</token>
              <value>${version.reports.rest}</value>
            </replacement>
            <replacement>
              <token>@commit.id.abbrev@</token>
              <value>${git.commit.id.abbrev}</value>
            </replacement>
            <replacement>
              <token>@build-time@</token>
              <value>${maven.build.timestamp}</value>
            </replacement>
          </replacements>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>replace</goal>
            </goals>
            <phase>process-sources</phase>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
