<?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>com.alibaba.hologres</groupId>
  <artifactId>holo-client</artifactId>
  <name>holo-client</name>
  <version>2.1.0</version>
  <description>client for Hologres</description>
  <url>https://www.hologres.io/</url>
  <developers>
    <developer>
      <id>shangtang</id>
      <name>shangtang.hyb</name>
      <organization>alibaba-inc</organization>
    </developer>
  </developers>
  <licenses>
    <license>
      <name>hologres client license</name>
      <url>https://github.com/hologres</url>
    </license>
  </licenses>
  <scm>
    <connection>scm:git:git@github.com:hologres/hologres-connectors.git</connection>
    <developerConnection>scm:git:git@github.com:hologres/hologres-connectors.git</developerConnection>
    <url>git@github.com:hologres/hologres-connectors.git</url>
  </scm>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.1</version>
        <configuration>
          <source>8</source>
          <target>8</target>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>3.1.1</version>
        <executions>
          <execution>
            <id>validate</id>
            <phase>validate</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>com.puppycrawl.tools</groupId>
            <artifactId>checkstyle</artifactId>
            <version>8.14</version>
          </dependency>
        </dependencies>
        <configuration>
          <suppressionsLocation>/tools/maven/suppressions.xml</suppressionsLocation>
          <configLocation>/tools/maven/checkstyle.xml</configLocation>
          <includeTestSourceDirectory>true</includeTestSourceDirectory>
          <logViolationsToConsole>true</logViolationsToConsole>
          <failOnViolation>true</failOnViolation>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>3.2.4</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <filters>
                <filter>
                  <artifact>com.alibaba.hologres:postgresql-holo</artifact>
                  <excludes>
                    <exclude>META-INF/MANIFEST.MF</exclude>
                    <exclude>META-INF/services/java.sql.Driver</exclude>
                  </excludes>
                </filter>
              </filters>
              <artifactSet>
                <excludes>
                  <exclude>org.slf4j:*</exclude>
                  <exclude>junit:junit</exclude>
                  <exclude>org.checkerframework:*</exclude>
                </excludes>
              </artifactSet>
              <relocations>
                <relocation>
                  <pattern>org.postgresql</pattern>
                  <shadedPattern>com.alibaba.hologres.org.postgresql</shadedPattern>
                  <excludes>
                    <exclude>org.postgresql.model.*</exclude>
                    <exclude>org.postgresql.core.SqlCommandType</exclude>
                  </excludes>
                </relocation>
                <relocation>
                  <pattern>com.codahale.metrics</pattern>
                  <shadedPattern>com.alibaba.hologres.com.codahale.metrics</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.google</pattern>
                  <shadedPattern>com.alibaba.hologres.com.google</shadedPattern>
                </relocation>
              </relocations>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.8</version>
        <executions>
          <execution>
            <id>generate</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <target>
                <property />
                <exec>
                  <arg />
                </exec>
              </target>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>versionInfo-source</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>${project.build.directory}/generated-sources/java</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>dev</id>
      <properties>
        <version.suffix>-SNAPSHOT</version.suffix>
      </properties>
    </profile>
    <profile>
      <id>prd</id>
      <properties />
    </profile>
  </profiles>
  <dependencies>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.7.10</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.13</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>hamcrest-core</artifactId>
          <groupId>org.hamcrest</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <version>1.7.10</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <properties>
    <metrics.version>4.1.16</metrics.version>
    <slf4j.version>1.7.10</slf4j.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
</project>
