<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.janusgraph</groupId>
        <artifactId>janusgraph</artifactId>
        <version>0.3.2</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    <artifactId>janusgraph-hadoop-parent</artifactId>
    <name>JanusGraph-Hadoop: Parent Module</name>
    <packaging>pom</packaging>
    <url>https://janusgraph.org</url>

    <properties>
        <top.level.basedir>${project.parent.basedir}</top.level.basedir>
        <skipCassandra>${skipTests}</skipCassandra>
        <!-- Cassandra-3 testing requires an external Cassandra instance. 
             See TESTING.md for more information. -->
        <skipCassandra3>true</skipCassandra3>
        <skipHBase>${skipTests}</skipHBase>
        <skipPipeline>${skipTests}</skipPipeline>
    </properties>

    <modules>
        <module>janusgraph-hadoop-core</module>
        <module>janusgraph-hadoop-2</module>
        <module>janusgraph-hadoop</module>
    </modules>

    <developers>
        <developer>
            <name>Marko A. Rodriguez</name>
            <email>marko@markorodriguez.com</email>
            <url>https://markorodriguez.com</url>
        </developer>
    </developers>

    <contributors>
        <contributor>
            <name>Stephen Mallette</name>
            <email>spmva@genoprime.com</email>
            <url>https://stephen.genoprime.com</url>
        </contributor>
        <contributor>
            <name>Matthias Broecheler</name>
            <email>me@matthiasb.com</email>
            <url>http://matthiasb.com</url>
        </contributor>
    </contributors>

    <dependencies>
        <dependency>
            <groupId>org.apache.tinkerpop</groupId>
            <artifactId>tinkergraph-gremlin</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.tinkerpop</groupId>
            <artifactId>hadoop-gremlin</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>javax.servlet</groupId>
                    <artifactId>jsp-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>javax.servlet</groupId>
                    <artifactId>servlet-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.tinkerpop</groupId>
            <artifactId>spark-gremlin</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>com.fasterxml.jackson.module</groupId>
                    <artifactId>jackson-module-scala_2.11</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.module</groupId>
            <artifactId>jackson-module-scala_2.11</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.scala-lang</groupId>
                    <artifactId>scala-library</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <!-- JANUSGRAPH -->
        <dependency>
            <groupId>org.janusgraph</groupId>
            <artifactId>janusgraph-core</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.janusgraph</groupId>
            <artifactId>janusgraph-cassandra</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.janusgraph</groupId>
            <artifactId>janusgraph-hbase</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.janusgraph</groupId>
            <artifactId>janusgraph-es</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.janusgraph</groupId>
            <artifactId>janusgraph-test</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.janusgraph</groupId>
            <artifactId>janusgraph-hbase-server</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.janusgraph</groupId>
            <artifactId>janusgraph-hbase-core</artifactId>
            <version>${project.version}</version>
            <classifier>tests</classifier>
            <scope>test</scope>
        </dependency>

        <!-- RDF PARSING -->
        <dependency>
            <groupId>org.openrdf.sesame</groupId>
            <artifactId>sesame-rio-n3</artifactId>
        </dependency>
        <dependency>
            <groupId>org.openrdf.sesame</groupId>
            <artifactId>sesame-rio-ntriples</artifactId>
        </dependency>
        <dependency>
            <groupId>org.openrdf.sesame</groupId>
            <artifactId>sesame-rio-rdfxml</artifactId>
        </dependency>
        <dependency>
            <groupId>org.openrdf.sesame</groupId>
            <artifactId>sesame-rio-trig</artifactId>
        </dependency>
        <dependency>
            <groupId>org.openrdf.sesame</groupId>
            <artifactId>sesame-rio-trix</artifactId>
        </dependency>
        <dependency>
            <groupId>org.openrdf.sesame</groupId>
            <artifactId>sesame-rio-turtle</artifactId>
        </dependency>

        <!-- Required for Cassandra-3 connectivity, see issue 172 -->
        <dependency>
            <groupId>com.datastax.cassandra</groupId>
            <artifactId>cassandra-driver-core</artifactId>
            <version>${cassandra-driver.version}</version>
            <exclusions>
              <exclusion>
                <groupId>io.dropwizard.metrics</groupId>
                <artifactId>metrics-core</artifactId>
              </exclusion>
            </exclusions>
        </dependency>
        <!-- Logging backends.
             Enforce a classpath ordering constraint to ensure slf4j-log4j12
             binding appears on the classpath before logback-classic.
             See comments in janusgraph-cassandra/pom.xml for more information. -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
        </dependency>
        <!-- End logging backends. -->
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>unpack-shared-resources</id>
                            <phase>generate-resources</phase>
                            <goals>
                                <goal>unpack</goal>
                            </goals>
                            <configuration>
                                <artifactItems>
                                    <artifactItem>
                                        <groupId>${project.groupId}</groupId>
                                        <artifactId>janusgraph-hadoop-core</artifactId>
                                        <version>${project.version}</version>
                                        <classifier>shared-resources</classifier>
                                        <outputDirectory>${project.build.directory}/shared-resources</outputDirectory>
                                    </artifactItem>
                                </artifactItems>
                            </configuration>
                        </execution>
                        <execution>
                            <id>unpack-common-test-classes</id>
                            <phase>process-test-classes</phase>
                            <goals>
                                <goal>unpack</goal>
                            </goals>
                            <configuration>
                                <artifactItems>
                                    <artifactItem>
                                        <groupId>${project.groupId}</groupId>
                                        <artifactId>janusgraph-hadoop-core</artifactId>
                                        <version>${project.version}</version>
                                        <classifier>tests</classifier>
                                        <outputDirectory>${project.build.directory}/test-classes</outputDirectory>
                                        <excludes>META-INF</excludes>
                                    </artifactItem>
                                </artifactItems>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <artifactId>maven-resources-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>filter-shared-resources</id>
                            <phase>process-test-resources</phase>
                            <goals>
                                <goal>copy-resources</goal>
                            </goals>
                            <configuration>
                                <outputDirectory>${project.build.directory}/test-classes</outputDirectory>
                                <resources>
                                    <resource>
                                        <directory>${project.build.directory}/shared-resources</directory>
                                        <filtering>true</filtering>
                                    </resource>
                                </resources>
                            </configuration>
                        </execution>
                        <execution>
                            <id>filter-cassandra-murmur-config</id>
                            <phase>process-test-resources</phase>
                            <goals>
                                <goal>copy-resources</goal>
                            </goals>
                            <configuration>
                                <outputDirectory>${project.build.directory}/cassandra/conf/localhost-murmur</outputDirectory>
                                <filters>
                                    <filter>${top.level.basedir}/janusgraph-cassandra/config/cassandra-filters/localhost-murmur.properties</filter>
                                </filters>
                                <resources>
                                    <resource>
                                        <directory>${top.level.basedir}/janusgraph-cassandra/config/cassandra</directory>
                                        <filtering>true</filtering>
                                    </resource>
                                </resources>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>build-job-jar</id>
                            <phase>package</phase>
                            <goals>
                                <goal>single</goal>
                            </goals>
                            <configuration>
                                <attach>false</attach>
                                <descriptors>
                                    <descriptor>${project.build.directory}/shared-resources/hadoop-job.xml</descriptor>
                                </descriptors>
                                <finalName>${project.artifactId}-${project.version}</finalName>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>default-test</id>
                            <configuration>
                                <excludes>
                                    <exclude>**/*PipelineTest.java</exclude>
                                    <exclude>**/JanusGraphCassandraOutputFormatTest.java</exclude>
                                    <exclude>**/*ReindexTest.java</exclude>
                                    <exclude>**/*ScanJobTest.java</exclude>
                                    <exclude>**/JanusGraphHBaseOutputFormatTest.java</exclude>
                                </excludes>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>janusgraph-cassandra-test</id>
                            <goals>
                                <goal>integration-test</goal>
                            </goals>
                            <configuration>
                                <includes>
                                    <include>**/*Cassandra*IT.java</include>
                                </includes>
                                <excludes>
                                    <exclude>**/*Cassandra3*IT.java</exclude>
                                </excludes>
                                <skipTests>${skipCassandra}</skipTests>
                                <reuseForks>false</reuseForks>
                                <summaryFile>target/failsafe-reports/failsafe-janusgraph-cassandra.xml</summaryFile>
                                <argLine>${default.test.jvm.opts} -Dtest.cassandra.confdir=${project.build.directory}/cassandra/conf/localhost-murmur -Dtest.cassandra.datadir=${project.build.directory}/cassandra/data/localhost-murmur</argLine>
                            </configuration>
                        </execution>
                        <!-- Cassandra-3 testing requires an external Cassandra instance. 
                        See TESTING.md for more information. -->
                        <execution>
                            <id>janusgraph-cassandra3-test</id>
                            <goals>
                                <goal>integration-test</goal>
                            </goals>
                            <configuration>
                                <includes>
                                    <include>**/*Cassandra3*IT.java</include>
                                </includes>
                                <skipTests>${skipCassandra3}</skipTests>
                                <reuseForks>false</reuseForks>
                                <summaryFile>target/failsafe-reports/failsafe-janusgraph-cassandra3.xml</summaryFile>
                            </configuration>
                        </execution>
                        <execution>
                            <id>janusgraph-hbase-test</id>
                            <goals>
                                <goal>integration-test</goal>
                            </goals>
                            <configuration>
                                <argLine>${default.test.jvm.opts} -Dtest.hbase.parentdir=${top.level.basedir}/janusgraph-hbase-parent/</argLine>
                                <includes>
                                    <include>**/*HBase*IT.java</include>
                                </includes>
                                <skipTests>${skipHBase}</skipTests>
                                <summaryFile>target/failsafe-reports/failsafe-janusgraph-hbase.xml</summaryFile>
                            </configuration>
                        </execution>
                        <!-- ************ -->
                        <!-- VERIFICATION -->
                        <!-- ************ -->
                        <execution>
                            <id>verify-janusgraph-cassandra-test</id>
                            <goals>
                                <goal>verify</goal>
                            </goals>
                            <configuration>
                                <skipTests>${skipCassandra}</skipTests>
                                <summaryFiles>
                                    <summaryFile>target/failsafe-reports/failsafe-janusgraph-cassandra.xml</summaryFile>
                                </summaryFiles>
                            </configuration>
                        </execution>
                        <execution>
                            <id>verify-hbase-test</id>
                            <goals>
                                <goal>verify</goal>
                            </goals>
                            <configuration>
                                <skipTests>${skipHBase}</skipTests>
                                <summaryFiles>
                                    <summaryFile>target/failsafe-reports/failsafe-janusgraph-hbase.xml</summaryFile>
                                </summaryFiles>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

                <!--
                <plugin>
                    <artifactId>maven-remote-resources-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>unpack-common-test-classes</id>
                            <phase>process-test-classes</phase>
                            <goals>
                                <goal>process</goal>
                            </goals>
                            <configuration>
                                <resourceBundles>
                                    <resourceBundle>${project.groupId}:shared-resources:${project.version}</resourceBundle>
                                </resourceBundles>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                -->
            </plugins>
        </pluginManagement>
    </build>
</project>
