<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>1.2.0</version>
    </parent>
    <artifactId>common</artifactId>
    <packaging>ejb</packaging>
    <dependencies>
    
        <dependency>
            <groupId>org.jboss.spec</groupId>
            <artifactId>jboss-javaee-7.0</artifactId>
            <type>pom</type>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-jaxrs</artifactId>
        </dependency>

        <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>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.enterprise</groupId>
            <artifactId>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>
        <dependency>
            <groupId>com.thetransactioncompany</groupId>
            <artifactId>jsonrpc2-base</artifactId>
        </dependency>        
    </dependencies>

    <build>
        <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>${version.da}</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>
