<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.21</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>1.8</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>4.4.15</aerospike-client.version>
        <janusgraph.version>0.5.3</janusgraph.version>
        <aerospike-batch-updater.version>0.0.17</aerospike-batch-updater.version>
        <netty-all.version>4.1.60.Final</netty-all.version>

        <!--Test-->
        <tinkerpop.version>3.4.6</tinkerpop.version>
        <junit.version>4.13</junit.version>
        <assertj.version>3.19.0</assertj.version>
        <testcontainers.version>1.15.2</testcontainers.version>
        <blockhound.version>1.0.4.RELEASE</blockhound.version>
        <disruptor.version>3.4.2</disruptor.version>

        <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
        <maven-release-plugin.version>2.5.3</maven-release-plugin.version>

        <!-- Sonar -->
        <surefire.plugin.version>2.19.1</surefire.plugin.version>
        <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
        <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
        <sonar.jacoco.reportPath>${project.basedir}/../target/jacoco.exec</sonar.jacoco.reportPath>
        <sonar.language>java</sonar.language>
        <jacoco-maven-plugin.version>0.8.5</jacoco-maven-plugin.version>

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

        <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>

        <!--plugins -->
        <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
        <maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
        <nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
        <embedded-aerospike.version>1.19</embedded-aerospike.version>
        <awaitility.version>4.0.3</awaitility.version>

    </properties>

    <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>
        <profile>
            <id>sonar</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <version>${jacoco-maven-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>pre-unit-test</id>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                                <configuration>
                                    <propertyName>surefireArgLine</propertyName>
                                    <destFile>${project.build.directory}/jacoco.exec</destFile>
                                </configuration>
                            </execution>
                            <execution>
                                <id>post-unit-test</id>
                                <phase>test</phase>
                                <goals>
                                    <goal>report</goal>
                                </goals>
                                <configuration>
                                    <!-- Sets the path to the file which contains the execution data. -->
                                    <dataFile>${project.build.directory}/jacoco.exec</dataFile>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <!-- Sets the VM argument line used when unit tests are run. -->
                            <argLine>${surefireArgLine}</argLine>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-release-plugin</artifactId>
                        <version>${maven-release-plugin.version}</version>
                        <configuration>
                            <autoVersionSubmodules>true</autoVersionSubmodules>
                            <useReleaseProfile>false</useReleaseProfile>
                            <releaseProfiles>release</releaseProfiles>
                            <goals>deploy</goals>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <dependencyManagement>
        <dependencies>

            <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.testcontainers</groupId>-->
<!--                <artifactId>junit-jupiter</artifactId>-->
<!--                <version>${testcontainers.version}</version>-->
<!--                <scope>test</scope>-->
<!--            </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>

    <dependencies>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                </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>
                </plugin>

                <!-- Produce code coverage -->
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>${jacoco-plugin.version}</version>
                </plugin>

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

                <!-- Submits coverage reports to Coveralls -->
                <plugin>
                    <groupId>org.eluder.coveralls</groupId>
                    <artifactId>coveralls-maven-plugin</artifactId>
                    <version>${coveralls-plugin.version}</version>
                </plugin>

                <!-- Attach Javadoc to release -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>

            <plugin>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.4.1</version>
                <configuration>
                    <useReleaseProfile>false</useReleaseProfile>
                    <releaseProfiles>release</releaseProfiles>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                </configuration>
            </plugin>

            <!-- Attach Javadoc to release -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
            </plugin>

            <!-- Attach sources to release -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</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>

</project>
