Gld Extension pom.xml Sample

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

Internal

Template

<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/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <name>GLD Extension for JBoss Data Grid 7</name>

    <groupId>io.novaordis.gld.extensions.jboss-datagrid</groupId>
    <artifactId>jboss-datagrid-7-root</artifactId>
    <version>1.0.0-SNAPSHOT-24</version>
    <packaging>pom</packaging>

    <properties>

        <!--
            The official extension name
        -->
        <extension.name>jboss-datagrid-7</extension.name>

        <!--
            Dependencies
        -->

        <novaordis.utilities.version>4.4.0-SNAPSHOT-8</novaordis.utilities.version>

        <!--
            This is the module containing common target-related functionality, 
            which can be shared among extensions corresponding to different 
            target versions. The dependence on the API is not declared directly
            but through this module.
        -->
        <gld.extension.jboss.datagrid.common.version>1.0.0-SNAPSHOT-11</gld.extension.jboss.datagrid.common.version>

        <slf4j.version>1.7.6</slf4j.version>
        <jdg.infinspan.client.hotrod.version>8.3.0.Final-redhat-1</jdg.infinspan.client.hotrod.version>

        <!--
            jboss.logging, commons pool, etc are not transitively pulled by Infinispan,
            but Infinispan classes will complain if not in the classpath, so we're
            pulling them explicitly.
        -->
        <jboss.logging.version>3.3.0.Final-redhat-1</jboss.logging.version>
        <commons.pool.version>1.6.0.redhat-9</commons.pool.version>
        <jboss.marshalling.version>1.4.10.Final-redhat-3</jboss.marshalling.version>

        <!--
            End of Dependencies
        -->

        <!--
             Property used by various paths within this file and release assembly file.
        -->
        <jboss.datagrid.version>7.0.0</jboss.datagrid.version>

        <source.java.version>1.8</source.java.version>
        <target.java.version>1.8</target.java.version>
        <test.scratch.directory>target/test-scratch</test.scratch.directory>
        <test.log.directory>target</test.log.directory>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.build.timestamp.format>MM/dd/yy</maven.build.timestamp.format>
        <release_date>${maven.build.timestamp}</release_date>
    </properties>

    <repositories>
        <repository>
            <id>jboss-eap-repository</id>
            <url>file:///Users/ovidiu/runtime/jboss-eap-7.0.0.GA-maven-repository/maven-repository</url>
        </repository>
        <repository>
            <id>jboss-datagrid-repository</id>
            <url>file:///Users/ovidiu/runtime/jboss-datagrid-${jboss.datagrid.version}-maven-repository/maven-repository</url>
        </repository>
    </repositories>

    <modules>
        <module>main</module>
        <module>release</module>    
    </modules> 

    <dependencies>
        <dependency>
            <groupId>io.novaordis.gld.extensions.jboss-datagrid</groupId>
            <artifactId>jboss-datagrid-common</artifactId>
            <version>${gld.extension.jboss.datagrid.common.version}</version>
            <!--
                Do not declare "provided", we want to ship this dependency.
            -->
        </dependency>
        <dependency>
            <groupId>io.novaordis.utilities</groupId>
            <artifactId>novaordis-utilities</artifactId>
            <version>${novaordis.utilities.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
            <scope>provided</scope>
        </dependency>


        <dependency>
            <groupId>org.infinispan</groupId>
            <artifactId>infinispan-client-hotrod</artifactId>
            <version>${jdg.infinspan.client.hotrod.version}</version>
        </dependency>

        <dependency>
            <groupId>org.infinispan</groupId>
            <artifactId>infinispan-commons</artifactId>
            <version>${jdg.infinspan.client.hotrod.version}</version>
        </dependency>

        <!--
            These dependencies is not transitively pulled by Infinispan,
            but Infinispan classes will complain if not in the classpath,
            so we're pulling them explicitly.
        -->
        <dependency>
            <groupId>org.jboss.logging</groupId>
            <artifactId>jboss-logging</artifactId>
            <version>${jboss.logging.version}</version>
        </dependency>
        <dependency>
            <groupId>commons-pool</groupId>
            <artifactId>commons-pool</artifactId>
            <version>${commons.pool.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jboss.marshalling</groupId>
            <artifactId>jboss-marshalling</artifactId>
            <version>${jboss.marshalling.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jboss.marshalling</groupId>
            <artifactId>jboss-marshalling-river</artifactId>
            <version>${jboss.marshalling.version}</version>
        </dependency>
        <dependency>
            <groupId>org.infinispan</groupId>
            <artifactId>infinispan-query-dsl</artifactId>
            <version>${jdg.infinspan.client.hotrod.version}</version>
        </dependency>

        <!--
            Testing dependencies
        -->

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
            <scope>test</scope>
        </dependency>
        <!--
            Only for testing, we don't want to ship with a specific binding.
        -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>${slf4j.version}</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.5.1</version>
                <configuration>
                    <source>${source.java.version}</source>
                    <target>${target.java.version}</target>
                    <debug>true</debug>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.8</version>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.ant</groupId>
                        <artifactId>ant</artifactId>
                        <version>1.7.0</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <phase>generate-test-resources</phase>
                        <configuration>
                            <tasks>
                                <mkdir dir="${test.scratch.directory}"/>
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <argLine>-Xmx512m</argLine>
                    <systemProperties>
                        <property>
                            <name>test.log.directory</name>
                            <value>${test.log.directory}</value>
                        </property>
                        <property>
                            <name>test.scratch.directory</name>
                            <value>${test.scratch.directory}</value>
                        </property>
                        <property>
                            <name>maven.injected.project.version</name>
                            <value>${project.version}</value>
                        </property>
                    </systemProperties>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>