<?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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.tikv</groupId>
  <artifactId>tikv-client-java</artifactId>
  <name>TiKV Java Client</name>
  <version>3.0.1</version>
  <description>A Java Client for TiKV</description>
  <url>http://github.com/tikv/client-java</url>
  <developers>
    <developer>
      <name>Xiaoyu Ma</name>
      <email>maxiaoyu@pingcap.com</email>
      <organization>PingCAP</organization>
      <organizationUrl>https://www.pingcap.com</organizationUrl>
    </developer>
    <developer>
      <name>Yifei Wu</name>
      <email>birdstorm@pingcap.com</email>
      <organization>PingCAP</organization>
      <organizationUrl>https://www.pingcap.com</organizationUrl>
    </developer>
    <developer>
      <name>Zhexuan Yang</name>
      <email>yangzhexuan@pingcap.com</email>
      <organization>PingCAP</organization>
      <organizationUrl>https://www.pingcap.com</organizationUrl>
    </developer>
    <developer>
      <name>Liangliang Gu</name>
      <email>guliangliang@pingcap.com</email>
      <organization>PingCAP</organization>
      <organizationUrl>https://www.pingcap.com</organizationUrl>
    </developer>
  </developers>
  <licenses>
    <license>
      <name>Apache 2.0 License</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <scm>
    <connection>scm:git:git://github.com/tikv/client-java.git</connection>
    <developerConnection>scm:git:ssh://github.com:tikv/client-java.git</developerConnection>
    <url>https://github.com/tikv/client-java/tree/master</url>
  </scm>
  <organization>
    <name>PingCAP</name>
  </organization>
  <build>
    <extensions>
      <extension>
        <groupId>kr.motd.maven</groupId>
        <artifactId>os-maven-plugin</artifactId>
        <version>1.4.1.Final</version>
      </extension>
    </extensions>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <groupId>org.antlr</groupId>
        <artifactId>antlr4-maven-plugin</artifactId>
        <version>4.7.1</version>
        <executions>
          <execution>
            <goals>
              <goal>antlr4</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <arguments>
            <argument>-package</argument>
            <argument>org.tikv.common.parser</argument>
          </arguments>
          <visitor>true</visitor>
          <sourceDirectory>./src/main/java/org/tikv/common/parser</sourceDirectory>
          <outputDirectory>./target/generated-sources/antlr4/java/org/tikv/common/parser</outputDirectory>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>1.6.0</version>
        <executions>
          <execution>
            <id>clone proto files</id>
            <phase>validate</phase>
            <goals>
              <goal>exec</goal>
            </goals>
            <configuration>
              <executable>${basedir}/scripts/proto.sh</executable>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <version>2.5</version>
        <executions>
          <execution>
            <id>copy-resources</id>
            <phase>validate</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${proto.folder}</outputDirectory>
              <resources>
                <resource>
                  <directory>${basedir}/kvproto/include</directory>
                  <includes>
                    <include>**/gogoproto/**</include>
                  </includes>
                </resource>
                <resource>
                  <directory>${basedir}/kvproto/include</directory>
                  <includes>
                    <include>*.proto</include>
                  </includes>
                </resource>
                <resource>
                  <directory>${basedir}/kvproto/proto</directory>
                  <filtering>true</filtering>
                </resource>
                <resource>
                  <directory>${basedir}/raft-rs/proto/proto</directory>
                  <filtering>true</filtering>
                </resource>
                <resource>
                  <directory>${basedir}/tipb/proto</directory>
                  <filtering>true</filtering>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.xolstice.maven.plugins</groupId>
        <artifactId>protobuf-maven-plugin</artifactId>
        <version>0.6.1</version>
        <executions>
          <execution>
            <goals>
              <goal>compile</goal>
              <goal>compile-custom</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
          <protoSourceRoot>${proto.folder}</protoSourceRoot>
          <includes>
            <param>**/*.proto</param>
          </includes>
          <pluginId>grpc-java</pluginId>
          <pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}</pluginArtifact>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.7.0</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
          <encoding>UTF-8</encoding>
          <showWarnings>true</showWarnings>
          <showDeprecation>true</showDeprecation>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.0.2</version>
        <configuration>
          <archive>
            <addMavenDescriptor>false</addMavenDescriptor>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.0.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <version>3.0.0</version>
        <configuration>
          <filesets>
            <fileset>
              <directory>${proto.folder}</directory>
            </fileset>
          </filesets>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.9.1</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <additionalparam>-Xdoclint:none</additionalparam>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <skip>${javadoc.skip}</skip>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>3.2.1</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <transformers>
                <transformer />
              </transformers>
              <relocations>
                <relocation>
                  <pattern>io.grpc</pattern>
                  <shadedPattern>shade.io.grpc</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.google</pattern>
                  <shadedPattern>shade.com.google</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>io.netty</pattern>
                  <shadedPattern>shade.io.netty</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>io.opencensus</pattern>
                  <shadedPattern>shade.io.opencensus</shadedPattern>
                </relocation>
              </relocations>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>3.1.0</version>
        <executions>
          <execution>
            <id>jar</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <descriptorRefs>
                <descriptorRef>jar-with-dependencies</descriptorRef>
              </descriptorRefs>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>0.8.3</version>
        <executions>
          <execution>
            <id>jacoco-initialize</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>jacoco-site</id>
            <phase>package</phase>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>com.coveo</groupId>
        <artifactId>fmt-maven-plugin</artifactId>
        <version>2.6.0</version>
        <executions>
          <execution>
            <phase>validate</phase>
            <goals>
              <goal>format</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <sourceDirectory>src/main/java</sourceDirectory>
          <testSourceDirectory>src/test/java</testSourceDirectory>
          <verbose>true</verbose>
          <filesNamePattern>.*\.java</filesNamePattern>
          <skip>false</skip>
          <skipSortingImports>false</skipSortingImports>
          <style>google</style>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>1.5</version>
        <executions>
          <execution>
            <id>sign-artifacts</id>
            <goals>
              <goal>sign</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <keyname>${gpg.keyname}</keyname>
          <skip>${gpg.skip}</skip>
        </configuration>
      </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>false</autoReleaseAfterClose>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.7.16</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      <version>1.7.16</version>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <artifactId>log4j</artifactId>
          <groupId>log4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>jul-to-slf4j</artifactId>
      <version>1.7.16</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>jcl-over-slf4j</artifactId>
      <version>1.7.16</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>io.grpc</groupId>
      <artifactId>grpc-testing</artifactId>
      <version>1.24.0</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>junit</artifactId>
          <groupId>junit</groupId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
  <properties>
    <jetcd.version>0.4.1</jetcd.version>
    <slf4j.version>1.7.16</slf4j.version>
    <trove4j.version>3.0.1</trove4j.version>
    <proto.folder>${basedir}/proto</proto.folder>
    <grpc.version>1.24.0</grpc.version>
    <joda-convert.version>1.9.2</joda-convert.version>
    <javadoc.skip>false</javadoc.skip>
    <powermock.version>1.6.6</powermock.version>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <log4j.version>1.2.17</log4j.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <gpg.skip>false</gpg.skip>
    <jackson.version>2.10.0</jackson.version>
    <gpg.keyname>Yifei Wu</gpg.keyname>
    <protobuf.version>3.5.1</protobuf.version>
    <joda-time.version>2.9.9</joda-time.version>
  </properties>
</project>
