<?xml version="1.0"?>
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.jboss.pnc.dingrogu</groupId>
        <artifactId>parent</artifactId>
        <version>3.5.2</version>
    </parent>

    <artifactId>common</artifactId>
    <name>Common</name>
    <dependencies>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-arc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.pnc</groupId>
            <artifactId>pnc-api</artifactId>
            <classifier>jakarta</classifier>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-rest</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.pnc.rex</groupId>
            <artifactId>rex-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.pnc.rex</groupId>
            <artifactId>rex-model</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.pnc</groupId>
            <artifactId>common</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.pnc</groupId>
            <artifactId>pnc-common</artifactId>
            <classifier>jakarta</classifier>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-junit5</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>pl.project13.maven</groupId>
                <artifactId>git-commit-id-plugin</artifactId>
                <version>4.9.10</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>revision</goal>
                        </goals>
                    </execution>
                </executions>

                <configuration>
                    <!--
                      If you'd like to tell the plugin where your .git directory is,
                      use this setting, otherwise we'll perform a search trying to
                      figure out the right directory. It's better to add it explicite IMHO.
                    -->
                    <dotGitDirectory>${project.basedir}/.git</dotGitDirectory>

                    <!-- false is default here, it prints some more information during the build -->
                    <verbose>true</verbose>

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