<?xml version="1.0" encoding="UTF-8"?>
<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>io.d11</groupId>
  <artifactId>vertx-aerospike-client</artifactId>
  <version>2.0.1</version>

  <name>${project.groupId}:${project.artifactId}</name>
  <description>Vertx aerospike module to be in vert.x projects.</description>
  <url>https://github.com/dream11/vertx-aerospike-client</url>

  <scm>
    <developerConnection>scm:git:https://github.com/dream11/vertx-aerospike-client.git</developerConnection>
    <connection>scm:git:https://github.com/dream11/vertx-aerospike-client.git</connection>
    <url>https://github.com/dream11/vertx-aerospike-client</url>
    <tag>HEAD</tag>
  </scm>

  <licenses>
    <license>
      <name>MIT License</name>
      <url>https://github.com/dream11/vertx-aerospike-client/raw/master/LICENSE</url>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Deepak Chougule</name>
      <email>deepak.chougule@dream11.com</email>
      <organization>Dream11</organization>
      <organizationUrl>https://www.dream11.com/</organizationUrl>
    </developer>

    <developer>
      <name>Akshay Patidar</name>
      <email>akshay.patidar@dream11.com</email>
      <organization>Dream11</organization>
      <organizationUrl>https://www.dream11.com/</organizationUrl>
    </developer>

    <developer>
      <name>Karan Kumar</name>
      <email>karan.kumar@dream11.com</email>
      <organization>Dream11</organization>
      <organizationUrl>https://www.dream11.com/</organizationUrl>
    </developer>

    <developer>
      <name>Srijan Gupta</name>
      <email>srijan@dream11.com</email>
      <organization>Dream11</organization>
      <organizationUrl>https://www.dream11.com/</organizationUrl>
    </developer>
  </developers>

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

  <properties>
    <aerospike-driver.version>4.4.18</aerospike-driver.version>
    <vertx.version>3.9.2</vertx.version>
    <netty.version>4.1.49.Final</netty.version>
    <guice.version>4.2.2</guice.version>
    <slf4j.version>1.8.0-beta2</slf4j.version>
    <logback.version>1.3.0-alpha4</logback.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <lombok.version>1.18.12</lombok.version>
    <testcontainers.version>1.15.3</testcontainers.version>
    <junit-jupiter.version>5.8.0-M1</junit-jupiter.version>
    <junit.version>4.13.2</junit.version>
    <hamcrest.version>2.2</hamcrest.version>

    <maven.compiler.plugin.version>3.8.1</maven.compiler.plugin.version>
    <maven.compile.version>1.8</maven.compile.version>
    <maven.compile.source>1.8</maven.compile.source>
    <maven.compile.target>1.8</maven.compile.target>
    <maven.clean.plugin.version>3.1.0</maven.clean.plugin.version>
    <maven.javadoc.plugin.version>3.2.0</maven.javadoc.plugin.version>
    <maven.surefire.plugin.version>3.0.0-M5</maven.surefire.plugin.version>
    <maven.jacoco.plugin.version>0.8.6</maven.jacoco.plugin.version>
    <mave.source.plugin.version>3.2.1</mave.source.plugin.version>
    <maven.gpg.plugin.version>3.0.1</maven.gpg.plugin.version>
    <maven.nexus.plugin.version>1.6.7</maven.nexus.plugin.version>
    <maven.release.plugin.version>3.0.0-M1</maven.release.plugin.version>
  </properties>

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

    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <version>${lombok.version}</version>
      <scope>provided</scope>
    </dependency>

    <!-- Vertx -->
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-core</artifactId>
    </dependency>

    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-codegen</artifactId>
    </dependency>

    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-rx-java2-gen</artifactId>
      <version>${vertx.version}</version>
    </dependency>

    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-rx-java2</artifactId>
    </dependency>

    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-junit5</artifactId>
      <scope>test</scope>
    </dependency>

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

    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-core</artifactId>
      <version>${logback.version}</version>
    </dependency>

    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>${logback.version}</version>
    </dependency>

    <dependency>
      <groupId>com.google.inject</groupId>
      <artifactId>guice</artifactId>
    </dependency>

    <dependency>
      <groupId>io.netty</groupId>
      <artifactId>netty-transport-native-kqueue</artifactId>
      <version>${netty.version}</version>
      <classifier>osx-x86_64</classifier>
    </dependency>

    <dependency>
      <groupId>io.netty</groupId>
      <artifactId>netty-transport-native-epoll</artifactId>
      <version>${netty.version}</version>
      <classifier>linux-x86_64</classifier>
    </dependency>

    <!--  Tests  -->
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <version>${junit-jupiter.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <version>${junit-jupiter.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.testcontainers</groupId>
      <artifactId>junit-jupiter</artifactId>
      <version>${testcontainers.version}</version>
      <scope>test</scope>
    </dependency>

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

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

  </dependencies>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>io.vertx</groupId>
        <artifactId>vertx-stack-depchain</artifactId>
        <version>${vertx.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>com.google.inject</groupId>
        <artifactId>guice-bom</artifactId>
        <version>${guice.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <plugins>

      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${maven.javadoc.plugin.version}</version>
        <configuration>
          <noqualifier>all</noqualifier>
          <detectJavaApiLink>false</detectJavaApiLink>
          <doclint>none</doclint>
        </configuration>
        <executions>
          <execution>
            <configuration>
              <reportOutputDirectory>target</reportOutputDirectory>
            </configuration>
            <id>aggregate</id>
            <goals>
              <goal>aggregate</goal>
            </goals>
            <phase>verify</phase>
          </execution>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
            <phase>package</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${maven.compiler.plugin.version}</version>
        <configuration>
          <compilerVersion>${maven.compile.version}</compilerVersion>
          <source>${maven.compile.source}</source>
          <target>${maven.compile.target}</target>
          <encoding>${project.build.sourceEncoding}</encoding>
          <useIncrementalCompilation>false</useIncrementalCompilation>

          <annotationProcessors combine.children="append">
            <annotationProcessor>lombok.launch.AnnotationProcessorHider$AnnotationProcessor</annotationProcessor>
            <annotationProcessor>io.vertx.codegen.CodeGenProcessor</annotationProcessor>
          </annotationProcessors>
          <generatedSourcesDirectory>${project.basedir}/src/main/generated</generatedSourcesDirectory>
          <compilerArgs>
            <arg>-Acodegen.output=${project.basedir}/src/main</arg>
          </compilerArgs>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <version>${maven.clean.plugin.version}</version>
        <configuration>
          <filesets>
            <fileset>
              <directory>${project.basedir}/src/main/generated</directory>
            </fileset>
          </filesets>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${maven.surefire.plugin.version}</version>
        <configuration>
          <!-- Ensures root cause ends up in the console -->
          <trimStackTrace>false</trimStackTrace>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>${maven.jacoco.plugin.version}</version>
        <executions>
          <execution>
            <id>pre-unit-test</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>post-unit-test</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>${mave.source.plugin.version}</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <phase>verify</phase>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>${maven.nexus.plugin.version}</version>
        <extensions>true</extensions>
        <configuration>
          <serverId>ossrh</serverId>
          <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
          <autoReleaseAfterClose>true</autoReleaseAfterClose>
        </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>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>${maven.gpg.plugin.version}</version>
            <configuration>
              <gpgArguments>
                <arg>--pinentry-mode</arg>
                <arg>loopback</arg>
              </gpgArguments>
            </configuration>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>