<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.playtika.janusgraph</groupId>
    <artifactId>aerospike</artifactId>
    <version>1.0.33</version>
    <packaging>pom</packaging>

    <modules>
        <module>aerospike-storage-backend</module>
        <module>aerospike-container</module>
        <module>aerospike-benchmark</module>
    </modules>

    <name>aerospike-janusgraph-storage-backend</name>
    <description>Aerospike storage backend for Janusgraph graph DB</description>
    <url>https://github.com/Playtika/aerospike-janusgraph-storage-backend</url>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <url>https://svn.apache.org/viewvc/maven</url>
        <connection>scm:git:git://github.com/Playtika/aerospike-janusgraph-storage-backend.git</connection>
        <developerConnection>scm:git:git@github.com:Playtika/aerospike-janusgraph-storage-backend.git</developerConnection>
        <tag>HEAD</tag>
    </scm>

    <developers>
        <developer>
            <id>kptfh</id>
            <name>Sergii Karpenko</name>
            <email>sergiy.karpenko@gmail.com</email>
        </developer>
    </developers>

    <properties>
        <java.version>17</java.version>
        <maven.compiler.source>${java.version}</maven.compiler.source>
        <maven.compiler.target>${java.version}</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <aerospike-client.version>6.2.0</aerospike-client.version>
        <janusgraph.version>0.5.3</janusgraph.version>

        <aerospike-batch-updater.version>0.0.24</aerospike-batch-updater.version>
        <metrics.version>4.1.18</metrics.version>
        <netty-all.version>4.1.60.Final</netty-all.version>

        <!--Test-->
        <tinkerpop.version>3.4.6</tinkerpop.version>
        <junit.version>4.13.1</junit.version>
        <assertj.version>3.19.0</assertj.version>
        <testcontainers.version>1.19.1</testcontainers.version>
        <blockhound.version>1.0.8.RELEASE</blockhound.version>
        <disruptor.version>3.4.2</disruptor.version>
        <embedded-aerospike.version>1.19</embedded-aerospike.version>
        <awaitility.version>4.0.3</awaitility.version>
        <junit.version>4.12</junit.version>
        <assertj.version>3.9.0</assertj.version>
        <slf4j-api.version>1.7.30</slf4j-api.version>
        <log4j.version>2.14.1</log4j.version>
        <jmh.version>1.25</jmh.version>

        <!--plugins -->
        <maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
        <maven-surefire-plugin.version>3.2.1</maven-surefire-plugin.version>
        <maven-source-plugin.version>3.3.0</maven-source-plugin.version>
        <maven-jar-plugin.version>3.3.0</maven-jar-plugin.version>
        <maven.javadoc.plugin.version>3.6.0</maven.javadoc.plugin.version>
        <maven.source.plugin.version>3.3.0</maven.source.plugin.version>
        <nexus-staging-maven-plugin.version>1.6.13</nexus-staging-maven-plugin.version>

        <maven-gpg-plugin.version>3.1.0</maven-gpg-plugin.version>
        <gitflow-incremental-builder.version>4.5.1</gitflow-incremental-builder.version>

        <!-- GPG -->
        <gpg.keyname>3EEF24C7</gpg.keyname>
        <gpg.defaultKeyring>false</gpg.defaultKeyring>
        <gpg.useagent>true</gpg.useagent>
        <gpg.lockMode>never</gpg.lockMode>

    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.openjdk.jmh</groupId>
                <artifactId>jmh-core</artifactId>
                <version>${jmh.version}</version>
            </dependency>
            <dependency>
                <groupId>org.openjdk.jmh</groupId>
                <artifactId>jmh-generator-annprocess</artifactId>
                <version>${jmh.version}</version>
            </dependency>

            <dependency>
                <groupId>io.dropwizard.metrics</groupId>
                <artifactId>metrics-core</artifactId>
                <version>${metrics.version}</version>
            </dependency>
            <dependency>
                <groupId>io.dropwizard.metrics</groupId>
                <artifactId>metrics-jvm</artifactId>
                <version>${metrics.version}</version>
            </dependency>
            <dependency>
                <groupId>io.dropwizard.metrics</groupId>
                <artifactId>metrics-graphite</artifactId>
                <version>${metrics.version}</version>
            </dependency>
            <dependency>
                <groupId>io.dropwizard.metrics</groupId>
                <artifactId>metrics-jmx</artifactId>
                <version>${metrics.version}</version>
            </dependency>

            <dependency>
                <groupId>org.janusgraph</groupId>
                <artifactId>janusgraph-core</artifactId>
                <version>${janusgraph.version}</version>
            </dependency>

            <dependency>
                <groupId>com.aerospike</groupId>
                <artifactId>aerospike-client</artifactId>
                <version>${aerospike-client.version}</version>
            </dependency>

            <dependency>
                <groupId>com.playtika.nosql</groupId>
                <artifactId>aerospike-batch-updater</artifactId>
                <version>${aerospike-batch-updater.version}</version>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j-api.version}</version>
            </dependency>

            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty-all</artifactId>
                <version>${netty-all.version}</version>
            </dependency>

            <!--Test-->

            <dependency>
                <groupId>org.apache.tinkerpop</groupId>
                <artifactId>gremlin-core</artifactId>
                <version>${tinkerpop.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.tinkerpop</groupId>
                <artifactId>gremlin-server</artifactId>
                <version>${tinkerpop.version}</version>
            </dependency>

            <dependency>
                <groupId>org.testcontainers</groupId>
                <artifactId>testcontainers</artifactId>
                <version>${testcontainers.version}</version>
            </dependency>

            <dependency>
                <groupId>org.testcontainers</groupId>
                <artifactId>cassandra</artifactId>
                <version>${testcontainers.version}</version>
            </dependency>

            <dependency>
                <groupId>org.janusgraph</groupId>
                <artifactId>janusgraph-test</artifactId>
                <version>${janusgraph.version}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.janusgraph</groupId>
                <artifactId>janusgraph-cql</artifactId>
                <version>${janusgraph.version}</version>
            </dependency>

            <dependency>
                <groupId>com.playtika.janusgraph</groupId>
                <artifactId>aerospike-container</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>com.playtika.janusgraph</groupId>
                <artifactId>aerospike-storage-backend</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>${assertj.version}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-slf4j-impl</artifactId>
                <version>${log4j.version}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.awaitility</groupId>
                <artifactId>awaitility</artifactId>
                <version>${awaitility.version}</version>
                <scope>test</scope>
            </dependency>

            <!--Needed for tracking blocking calls in reactive application https://github.com/reactor/BlockHound -->
            <dependency>
                <groupId>io.projectreactor.tools</groupId>
                <artifactId>blockhound</artifactId>
                <version>${blockhound.version}</version>
                <scope>test</scope>
            </dependency>

            <!--Need it to make log4j2 async-->
            <dependency>
                <groupId>com.lmax</groupId>
                <artifactId>disruptor</artifactId>
                <version>${disruptor.version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${maven-jar-plugin.version}</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>test-jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven-compiler-plugin.version}</version>
                    <configuration>
                        <source>${java.version}</source>
                        <target>${java.version}</target>
                    </configuration>
                </plugin>

                <!-- Run tests -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${maven-surefire-plugin.version}</version>
                    <configuration>
                        <argLine>-XX:+AllowRedefinitionToAddDeleteMethods --add-opens java.base/java.util.concurrent.atomic=ALL-UNNAMED</argLine>
                    </configuration>
                </plugin>

                <!-- Attach sources to release -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${maven-source-plugin.version}</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <!-- Attach Javadoc to release -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${maven.javadoc.plugin.version}</version>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <source>17</source>
                        <doclint>none</doclint>
                        <failOnError>false</failOnError>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>io.github.gitflow-incremental-builder</groupId>
                    <artifactId>gitflow-incremental-builder</artifactId>
                    <version>${gitflow-incremental-builder.version}</version>
                    <extensions>true</extensions>
                    <configuration>
                        <disableIfBranchMatches>develop</disableIfBranchMatches>
                        <fetchReferenceBranch>true</fetchReferenceBranch>
                        <referenceBranch>refs/remotes/origin/develop</referenceBranch>
                        <buildUpstream>always</buildUpstream>
                        <skipTestsForUpstreamModules>true</skipTestsForUpstreamModules>
                        <buildUpstreamMode>impacted</buildUpstreamMode>
                        <skipIfPathMatches>\.github[/\\].*|\.mvn[/\\].*|mvnw.*</skipIfPathMatches>
                        <!-- Ignores Readme changes in parent or any submodule-->
                        <excludePathsMatching>(.*[/\\])?README.adoc</excludePathsMatching>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>io.github.gitflow-incremental-builder</groupId>
                <artifactId>gitflow-incremental-builder</artifactId>
            </plugin>
        </plugins>
    </build>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <profiles>
        <profile>
            <id>ossrh</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>${nexus-staging-maven-plugin.version}</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${maven-gpg-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
