<?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.2.0</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>
        <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>
      </plugin>
      <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-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>org.tikv.shade.io.grpc</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.google</pattern>
                  <shadedPattern>org.tikv.shade.com.google</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>io.netty</pattern>
                  <shadedPattern>org.tikv.shade.io.netty</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>io.opencensus</pattern>
                  <shadedPattern>org.tikv.shade.io.opencensus</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>io.prometheus</pattern>
                  <shadedPattern>org.tikv.shade.io.prometheus</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.fasterxml.jackson</pattern>
                  <shadedPattern>org.tikv.shade.com.fasterxml.jackson</shadedPattern>
                </relocation>
              </relocations>
            </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>true</autoReleaseAfterClose>
        </configuration>
      </plugin>
      <plugin>
        <groupId>io.github.git-commit-id</groupId>
        <artifactId>git-commit-id-maven-plugin</artifactId>
        <version>4.9.9</version>
        <executions>
          <execution>
            <id>get-the-git-infos</id>
            <phase>initialize</phase>
            <goals>
              <goal>revision</goal>
            </goals>
          </execution>
          <execution>
            <id>validate-the-git-infos</id>
            <phase>package</phase>
            <goals>
              <goal>validateRevision</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <verbose>true</verbose>
          <generateGitPropertiesFile>true</generateGitPropertiesFile>
          <generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties</generateGitPropertiesFilename>
          <includeOnlyProperties>
            <includeOnlyProperty>^git.build.(time|version)$</includeOnlyProperty>
            <includeOnlyProperty>^git.commit.id.(abbrev|full)$</includeOnlyProperty>
          </includeOnlyProperties>
          <commitIdGenerationMode>full</commitIdGenerationMode>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>3.0.0-M5</version>
        <configuration>
          <forkMode>always</forkMode>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-site-plugin</artifactId>
        <version>3.7.1</version>
      </plugin>
      <plugin>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>3.0.0</version>
      </plugin>
      <plugin>
        <groupId>com.github.spotbugs</groupId>
        <artifactId>spotbugs-maven-plugin</artifactId>
        <version>4.5.2.0</version>
        <dependencies>
          <dependency>
            <groupId>com.github.spotbugs</groupId>
            <artifactId>spotbugs</artifactId>
            <version>4.5.3</version>
          </dependency>
        </dependencies>
        <configuration>
          <includeFilterFile>dev/spotbugs-include.xml</includeFilterFile>
          <xmlOutput>true</xmlOutput>
          <failOnError>false</failOnError>
        </configuration>
      </plugin>
      <plugin>
        <groupId>au.com.acegi</groupId>
        <artifactId>xml-format-maven-plugin</artifactId>
        <version>3.2.0</version>
        <executions>
          <execution>
            <id>xml-format</id>
            <phase>validate</phase>
            <goals>
              <goal>xml-format</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <indentSize>4</indentSize>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>jdk9plus</id>
      <dependencies>
        <dependency>
          <groupId>javax.annotation</groupId>
          <artifactId>javax.annotation-api</artifactId>
          <version>1.3.2</version>
          <scope>provided</scope>
        </dependency>
      </dependencies>
    </profile>
  </profiles>
  <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.38.0</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>junit</artifactId>
          <groupId>junit</groupId>
        </exclusion>
        <exclusion>
          <artifactId>opencensus-api</artifactId>
          <groupId>io.opencensus</groupId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
  <reporting>
    <plugins>
      <plugin>
        <groupId>com.github.spotbugs</groupId>
        <artifactId>spotbugs-maven-plugin</artifactId>
        <version>4.5.2.0</version>
        <configuration>
          <xmlOutput>true</xmlOutput>
          <xmlOutputDirectory>target/site</xmlOutputDirectory>
          <includeFilterFile>dev/spotbugs-include.xml</includeFilterFile>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-jxr-plugin</artifactId>
        <version>3.1.1</version>
      </plugin>
    </plugins>
  </reporting>
  <properties>
    <grpc.version>1.38.0</grpc.version>
    <netty.tcnative.version>2.0.34.Final</netty.tcnative.version>
    <gson.version>2.8.9</gson.version>
    <gpg.keyname>fake gpg key name</gpg.keyname>
    <trove4j.version>3.0.1</trove4j.version>
    <gpg.skip>true</gpg.skip>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <joda-convert.version>1.9.2</joda-convert.version>
    <maven.compiler.source>1.8</maven.compiler.source>
    <proto.folder>${basedir}/proto</proto.folder>
    <rocksdb.version>6.22.1.1</rocksdb.version>
    <slf4j.version>1.7.16</slf4j.version>
    <powermock.version>1.6.6</powermock.version>
    <jetcd.version>0.4.1</jetcd.version>
    <maven.compiler.target>1.8</maven.compiler.target>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <joda-time.version>2.9.9</joda-time.version>
    <protobuf.version>3.5.1</protobuf.version>
    <jackson.version>2.12.3</jackson.version>
    <log4j.version>1.2.17</log4j.version>
  </properties>
</project>
