<?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>com.github.mrzhqiang.helper</groupId>
  <artifactId>helper-parent</artifactId>
  <version>2018.1.2</version>
  <packaging>pom</packaging>

  <name>Helper (Parent)</name>
  <description>An common tools for Java.</description>
  <url>https://github.com/mrzhqiang/helper</url>

  <modules>
    <module>helper</module>
    <module>database</module>
    <module>samples</module>
  </modules>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.sourceEncoding>UTF-8</project.reporting.sourceEncoding>

    <!-- JDK -->
    <java.version>1.8</java.version>

    <!-- Test -->
    <junit.version>4.12</junit.version>

    <!-- Logger -->
    <logback.version>1.2.3</logback.version>

    <!-- Helper -->
    <config.version>1.3.3</config.version>
    <guava.version>22.0</guava.version>
    <!-- Database API -->
    <slf4j.version>1.7.25</slf4j.version>
    <guice.version>4.2.1</guice.version>
    <!-- Redis -->
    <gson.version>2.8.0</gson.version>
    <jedis.version>2.9.0</jedis.version>
    <!-- MySQL -->
    <ebean.version>11.22.9</ebean.version>
    <ebean-test-config.version>11.21.1</ebean-test-config.version>
    <mysql.version>8.0.11</mysql.version>
    <!-- Cassandra -->
    <cassandra-driver.version>3.6.0</cassandra-driver.version>
    <!-- Elasticsearch -->
    <elasticsearch-client.version>5.5.3</elasticsearch-client.version>
  </properties>

  <scm>
    <url>https://github.com/mrzhqiang/helper</url>
    <connection>scm:git:https://github.com/mrzhqiang/helper.git</connection>
    <developerConnection>scm:git:git@github.com:mrzhqiang/helper.git</developerConnection>
  </scm>

  <issueManagement>
    <system>GitHub Issues</system>
    <url>https://github.com/mrzhqiang/helper/issues</url>
  </issueManagement>

  <licenses>
    <license>
      <name>Apache 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Qiang Zhang</name>
      <email>qiang.zhang0314@gmail.com</email>
      <timezone>+8</timezone>
    </developer>
  </developers>

  <dependencyManagement>
    <dependencies>
      <!-- https://mvnrepository.com/artifact/junit/junit -->
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${junit.version}</version>
        <scope>test</scope>
      </dependency>
      <!-- https://mvnrepository.com/artifact/ch.qos.logback/logback-classic -->
      <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>${logback.version}</version>
        <scope>test</scope>
      </dependency>

      <!-- https://mvnrepository.com/artifact/com.google.code.findbugs/jsr305 -->
      <dependency>
        <groupId>com.google.code.findbugs</groupId>
        <artifactId>jsr305</artifactId>
        <version>3.0.2</version>
      </dependency>

      <!-- https://mvnrepository.com/artifact/com.typesafe/config -->
      <dependency>
        <groupId>com.typesafe</groupId>
        <artifactId>config</artifactId>
        <version>${config.version}</version>
      </dependency>
      <!-- https://mvnrepository.com/artifact/com.google.guava/guava -->
      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>${guava.version}</version>
      </dependency>
      <!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j.version}</version>
      </dependency>
      <!-- https://mvnrepository.com/artifact/com.google.inject/guice -->
      <dependency>
        <groupId>com.google.inject</groupId>
        <artifactId>guice</artifactId>
        <version>${guice.version}</version>
      </dependency>
      <!-- https://mvnrepository.com/artifact/com.google.code.gson/gson -->
      <dependency>
        <groupId>com.google.code.gson</groupId>
        <artifactId>gson</artifactId>
        <version>${gson.version}</version>
      </dependency>
      <!-- https://mvnrepository.com/artifact/redis.clients/jedis -->
      <dependency>
        <groupId>redis.clients</groupId>
        <artifactId>jedis</artifactId>
        <version>${jedis.version}</version>
      </dependency>
      <!-- https://mvnrepository.com/artifact/io.ebean/ebean -->
      <dependency>
        <groupId>io.ebean</groupId>
        <artifactId>ebean</artifactId>
        <version>${ebean.version}</version>
      </dependency>
      <!-- https://mvnrepository.com/artifact/io.ebean.test/ebean-test-config -->
      <dependency>
        <groupId>io.ebean.test</groupId>
        <artifactId>ebean-test-config</artifactId>
        <version>${ebean-test-config.version}</version>
      </dependency>
      <!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
      <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <version>${mysql.version}</version>
      </dependency>
      <!-- https://mvnrepository.com/artifact/com.datastax.cassandra/cassandra-driver-core -->
      <dependency>
        <groupId>com.datastax.cassandra</groupId>
        <artifactId>cassandra-driver-core</artifactId>
        <version>${cassandra-driver.version}</version>
      </dependency>
      <!-- https://mvnrepository.com/artifact/com.datastax.cassandra/cassandra-driver-mapping -->
      <dependency>
        <groupId>com.datastax.cassandra</groupId>
        <artifactId>cassandra-driver-mapping</artifactId>
        <version>${cassandra-driver.version}</version>
      </dependency>
      <!-- https://mvnrepository.com/artifact/com.datastax.cassandra/cassandra-driver-extras -->
      <dependency>
        <groupId>com.datastax.cassandra</groupId>
        <artifactId>cassandra-driver-extras</artifactId>
        <version>${cassandra-driver.version}</version>
      </dependency>
      <!-- https://mvnrepository.com/artifact/org.elasticsearch.client/rest -->
      <dependency>
        <groupId>org.elasticsearch.client</groupId>
        <artifactId>rest</artifactId>
        <version>${elasticsearch-client.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.7.0</version>
          <configuration>
            <compilerId>javac-with-errorprone</compilerId>
            <forceJavacCompilerUse>true</forceJavacCompilerUse>
            <source>${java.version}</source>
            <target>${java.version}</target>
          </configuration>
          <dependencies>
            <dependency>
              <groupId>org.codehaus.plexus</groupId>
              <artifactId>plexus-compiler-javac-errorprone</artifactId>
              <version>2.8.4</version>
            </dependency>
            <dependency>
              <groupId>com.google.errorprone</groupId>
              <artifactId>error_prone_core</artifactId>
              <version>2.3.1</version>
            </dependency>
          </dependencies>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.2.1</version>
          <executions>
            <execution>
              <id>attach-sources</id>
              <goals>
                <goal>jar-no-fork</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.9.1</version>
          <executions>
            <execution>
              <id>attach-javadocs</id>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>1.5</version>
          <executions>
            <execution>
              <id>sign-artifacts</id>
              <phase>verify</phase>
              <goals>
                <goal>sign</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>1.5</version>
      </plugin>

      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>1.6.7</version>
        <extensions>true</extensions>
        <configuration>
          <serverId>ossrh</serverId>
          <nexusUrl>https://oss.sonatype.org/</nexusUrl>
          <autoReleaseAfterClose>true</autoReleaseAfterClose>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>