<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>
    <groupId>com.amazonaws</groupId>
    <artifactId>dynamodb-titan100-storage-backend</artifactId>
    <version>1.0.3</version>
    <packaging>jar</packaging>
    <name>Amazon DynamoDB Storage Backend for Titan</name>
    <url>https://github.com/awslabs/dynamodb-titan-storage-backend</url>
    <description>The Amazon DynamoDB Storage Backend for Titan: Distributed Graph Database allows Titan graphs to use DynamoDB as a storage backend.</description>
    <scm>
        <url>git@github.com:awslabs/dynamodb-titan-storage-backend.git</url>
        <tag>titan1.0.0-1.0.3</tag>
    </scm>
    <properties>
        <default.test.jvm.opts>-Xms256m -Xmx1280m -XX:+HeapDumpOnOutOfMemoryError</default.test.jvm.opts>
        <mem.jvm.opts>-Xms256m -Xmx768m -ea -XX:+HeapDumpOnOutOfMemoryError</mem.jvm.opts>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <dynamodb-local.port>4567</dynamodb-local.port>
        <dynamodb-local.endpoint>http://localhost:${dynamodb-local.port}</dynamodb-local.endpoint>
        <jdk.version>1.8</jdk.version>
        <aws.java.sdk.version>[1.11.86, 2.0.0)</aws.java.sdk.version>
        <aws.dynamodblocal.version>1.11.86</aws.dynamodblocal.version>
        <titan.version>1.0.0</titan.version>
        <tinkerpop.version>3.0.1-incubating</tinkerpop.version>
        <dependency.plugin.version>2.10</dependency.plugin.version>
        <maven.assembly.plugin.version>2.5.5</maven.assembly.plugin.version>
        <maven.compiler.plugin.version>3.3</maven.compiler.plugin.version>
        <maven.surefire.version>2.18.1</maven.surefire.version>
        <maven.failsafe.version>2.19.1</maven.failsafe.version>
        <maven.resources.plugin.version>2.7</maven.resources.plugin.version>
        <exec.maven.plugin.version>1.2</exec.maven.plugin.version>
        <slf4j.version>1.7.5</slf4j.version>
        <jackson2.version>2.5.3</jackson2.version>
        <opencsv.version>2.4</opencsv.version>
        <metrics3.version>3.0.1</metrics3.version>
        <commons.logging.version>1.1.1</commons.logging.version>
        <sqlite4java.version>1.0.392</sqlite4java.version>
        <hamcrest.version>1.3</hamcrest.version>
        <hadoop.version>2.2.0</hadoop.version>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <include.category></include.category>
        <exclude.category></exclude.category>
        <test.excluded.groups>com.thinkaurelius.titan.testcategory.MemoryTests,com.thinkaurelius.titan.testcategory.PerformanceTests,com.thinkaurelius.titan.testcategory.BrittleTests,com.thinkaurelius.titan.testcategory.OrderedKeyStoreTests,com.thinkaurelius.titan.testcategory.SerialTests</test.excluded.groups>
    </properties>
    <developers>
        <developer>
            <name>Alexander Patrikalakis</name>
            <email>amcp@me.com</email>
            <url>https://www.linkedin.com/in/amcpatrix/en</url>
        </developer>
        <developer>
            <name>Matthew Sowders</name>
            <email>matthewsowders@gmail.com</email>
            <url>https://www.linkedin.com/in/matthewsowders/en</url>
        </developer>
        <developer>
            <name>Michael Rodaitis</name>
            <email>mrodaitis@gmail.com</email>
        </developer>
    </developers>
    <contributors>
        <contributor>
            <name>Zameer Merali</name>
            <email>zmerali@amazon.com</email>
        </contributor>
        <contributor>
            <name>Justin Panian</name>
            <email>panianj@amazon.com</email>
        </contributor>
    </contributors>
    <inceptionYear>2014</inceptionYear>
    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <!-- Libraries -->
    <dependencies>
        <dependency>
            <groupId>com.amazonaws</groupId>
            <artifactId>aws-java-sdk-dynamodb</artifactId>
            <version>${aws.java.sdk.version}</version>
        </dependency>
        <dependency>
            <groupId>com.amazonaws</groupId>
            <artifactId>DynamoDBLocal</artifactId>
            <version>${aws.dynamodblocal.version}</version>
        </dependency>
        <dependency>
            <groupId>com.thinkaurelius.titan</groupId>
            <artifactId>titan-core</artifactId>
            <version>${titan.version}</version>
        </dependency>
        <dependency>
            <groupId>com.thinkaurelius.titan</groupId>
            <artifactId>titan-test</artifactId>
            <version>${titan.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.thinkaurelius.titan</groupId>
            <artifactId>titan-es</artifactId>
            <version>${titan.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.codahale.metrics</groupId>
            <artifactId>metrics-core</artifactId>
            <version>${metrics3.version}</version>
        </dependency>
        <dependency>
            <groupId>au.com.bytecode</groupId>
            <artifactId>opencsv</artifactId>
            <version>${opencsv.version}</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-json-org</artifactId>
            <version>${jackson2.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
        <!-- Gremlin -->
        <dependency>
            <groupId>org.apache.tinkerpop</groupId>
            <artifactId>gremlin-core</artifactId>
            <version>${tinkerpop.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.tinkerpop</groupId>
            <artifactId>gremlin-groovy</artifactId>
            <version>${tinkerpop.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.tinkerpop</groupId>
            <artifactId>gremlin-test</artifactId>
            <version>${tinkerpop.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
            <scope>test</scope>
        </dependency>
        <!-- for Gremlin console -->
        <dependency>
            <groupId>org.apache.tinkerpop</groupId>
            <artifactId>gremlin-console</artifactId>
            <version>${tinkerpop.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.httpcomponents</groupId>
                    <artifactId>httpclient</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven.compiler.plugin.version}</version>
                <configuration>
                    <source>${jdk.version}</source>
                    <target>${jdk.version}</target>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven.surefire.version}</version>
                <!-- Use the single-integration-tests and multi-integration-tests profiles below -->
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>${maven.resources.plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>${dependency.plugin.version}</version>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>process-test-resources</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/dependencies</outputDirectory>
                            <overWriteReleases>false</overWriteReleases>
                            <overWriteSnapshots>false</overWriteSnapshots>
                            <overWriteIfNewer>true</overWriteIfNewer>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>integration-tests</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.googlecode.maven-download-plugin</groupId>
                        <artifactId>download-maven-plugin</artifactId>
                        <version>1.2.1</version>
                        <executions>
                            <execution>
                                <id>install-dynamodb_local</id>
                                <phase>pre-integration-test</phase>
                                <goals>
                                    <goal>wget</goal>
                                </goals>
                                <configuration>
                                    <url>https://s3-us-west-2.amazonaws.com/dynamodb-local/dynamodb_local_latest.zip</url>
                                    <unpack>true</unpack>
                                    <outputDirectory>${project.build.directory}/dynamodb</outputDirectory>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>com.bazaarvoice.maven.plugins</groupId>
                        <artifactId>process-exec-maven-plugin</artifactId>
                        <version>0.4</version>
                        <executions>
                            <execution>
                                <id>dynamodb_local</id>
                                <phase>pre-integration-test</phase>
                                <goals>
                                    <goal>start</goal>
                                </goals>
                                <configuration>
                                    <name>dynamodb_local</name>
                                    <waitAfterLaunch>1</waitAfterLaunch>
                                    <arguments>
                                        <argument>java</argument>
                                        <argument>-Djava.library.path=dynamodb/DynamoDBLocal_lib</argument>
                                        <argument>-jar</argument>
                                        <argument>dynamodb/DynamoDBLocal.jar</argument>
                                        <argument>-inMemory</argument>
                                        <argument>-port</argument>
                                        <argument>${dynamodb-local.port}</argument>
                                        <argument>-sharedDb</argument>
                                    </arguments>
                                </configuration>
                            </execution>
                            <!--Stop Process-->
                            <execution>
                                <id>stop-jar-process</id>
                                <phase>post-integration-test</phase>
                                <goals><goal>stop-all</goal></goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <version>${maven.failsafe.version}</version>
                        <executions>
                            <execution>
                                <id>default-integration-tests</id>
                                <goals>
                                    <goal>integration-test</goal>
                                    <goal>verify</goal>
                                </goals>
                                <configuration>
                                    <excludedGroups>${test.excluded.groups},${exclude.category}</excludedGroups>
                                    <includes>
                                        <include>${include.category}</include>
                                    </includes>
                                    <skip>false</skip>
                                    <systemPropertyVariables>
                                        <dynamodb-partitions>1</dynamodb-partitions>
                                        <dynamodb-control-plane-rate>10000</dynamodb-control-plane-rate>
                                        <dynamodb-unlimited-iops>true</dynamodb-unlimited-iops>
                                        <properties-file>src/test/resources/dynamodb-local.properties</properties-file>
                                        <dynamo.endpoint>http://localhost:${dynamodb-local.port}</dynamo.endpoint>
                                    </systemPropertyVariables>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>start-dynamodb-local</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <version>${exec.maven.plugin.version}</version>
                        <executions>
                            <execution>
                                <phase>test</phase>
                                <configuration>
                                    <executable>java</executable>
                                    <arguments>
                                        <argument>-cp</argument>
                                        <classpath/>
                                        <argument>-Dsqlite4java.library.path=${basedir}/target/dependencies</argument>
                                        <argument>com.amazonaws.services.dynamodbv2.local.main.ServerRunner</argument>
                                        <argument>-inMemory</argument>
                                        <argument>-port</argument>
                                        <argument>${dynamodb-local.port}</argument>
                                        <argument>-sharedDb</argument>
                                    </arguments>
                                </configuration>
                                <goals>
                                    <goal>exec</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>start-gremlin</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <version>${exec.maven.plugin.version}</version>
                        <executions>
                            <execution>
                                <phase>test</phase>
                                <configuration>
                                    <executable>java</executable>
                                    <arguments>
                                        <argument>-Dsqlite4java.library.path=${basedir}/target/dependencies</argument>
                                        <argument>-cp</argument>
                                        <argument>${basedir}/target/dependencies/*${path.separator}${basedir}/target/dynamodb-titan100-storage-backend-${project.version}.jar</argument>
                                        <argument>org.apache.tinkerpop.gremlin.console.Console</argument>
                                    </arguments>
                                </configuration>
                                <goals>
                                    <goal>exec</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    <repositories>
        <repository>
            <id>dynamodblocal</id>
            <name>AWS DynamoDB Local Release Repository</name>
            <url>https://s3-us-west-2.amazonaws.com/dynamodb-local/release</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-core</artifactId>
                <version>${hamcrest.version}</version>
            </dependency>
            <dependency>
                <groupId>com.almworks.sqlite4java</groupId>
                <artifactId>sqlite4java</artifactId>
                <version>${sqlite4java.version}</version>
            </dependency>
            <dependency>
                <groupId>commons-logging</groupId>
                <artifactId>commons-logging</artifactId>
                <version>${commons.logging.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>
</project>
