<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>2.3.2-SNAPSHOT</version>
    </parent>
    <artifactId>common</artifactId>
    <packaging>ejb</packaging>
    <dependencies>

        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.jboss.pnc</groupId>
            <artifactId>constants</artifactId>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>
        <dependency>
            <groupId>jakarta.enterprise</groupId>
            <artifactId>jakarta.enterprise.cdi-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.commonjava.maven.ext</groupId>
            <artifactId>pom-manipulation-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-ejb-plugin</artifactId>
                    <configuration>
                        <archive>
                            <manifestEntries combine.children="append">
                                <Dependencies>
                                    org.apache.httpcomponents export meta-inf
                                </Dependencies>
                            </manifestEntries>
                        </archive>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>pl.project13.maven</groupId>
                <artifactId>git-commit-id-plugin</artifactId>
                <version>2.2.0</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.0</version>
                <executions>
                    <execution>
                        <phase>process-sources</phase>
                        <goals>
                            <goal>replace</goal>
                        </goals>
                    </execution>
                </executions>
                <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>
                    </replacements>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
