<?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">
  <parent>
    <artifactId>ali-phoenix</artifactId>
    <groupId>com.aliyun.phoenix</groupId>
    <version>5.1.0-HBase-2.0.0.2</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>ali-phoenix-shaded-thin-client</artifactId>
  <name>Phoenix Query Server Client</name>
  <description>A shaded thin JDBC client for interacting with the query server</description>
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <organization>
    <name>Apache Software Foundation</name>
    <url>http://www.apache.org</url>
  </organization>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-deploy-plugin</artifactId>
        <version>2.7</version>
        <executions>
          <execution>
            <id>deploy-executable</id>
            <goals>
              <goal>deploy-file</goal>
            </goals>
            <configuration>
              <file>target/ali-phoenix-shaded-thin-client-${project.version}.jar</file>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <includeDependencySources>true</includeDependencySources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <outputDirectory>${project.build.directory}/unshaded</outputDirectory>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <id>thin-client</id>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <finalName>ali-phoenix-shaded-thin-client-${project.version}</finalName>
              <shadedArtifactAttached>false</shadedArtifactAttached>
              <promoteTransitiveDependencies>true</promoteTransitiveDependencies>
              <createSourcesJar>true</createSourcesJar>
              <shadeTestJar>false</shadeTestJar>
              <transformers>
                <transformer>
                  <resource>README.md</resource>
                  <file>${project.basedir}/../README.md</file>
                </transformer>
                <transformer>
                  <resource>LICENSE.txt</resource>
                  <file>${project.basedir}/../LICENSE</file>
                </transformer>
                <transformer>
                  <resource>NOTICE</resource>
                  <file>${project.basedir}/../NOTICE</file>
                </transformer>
                <transformer />
              </transformers>
              <filters>
                <filter>
                  <artifact>*:*</artifact>
                  <excludes>
                    <exclude>META-INF/*.SF</exclude>
                    <exclude>META-INF/*.DSA</exclude>
                    <exclude>META-INF/*.RSA</exclude>
                    <exclude>META-INF/license/*</exclude>
                    <exclude>LICENSE.*</exclude>
                    <exclude>NOTICE.*</exclude>
                  </excludes>
                </filter>
              </filters>
              <relocations>
                <relocation>
                  <pattern>com.fasterxml</pattern>
                  <shadedPattern>${shaded.package}.com.fasterxml</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.google.collect</pattern>
                  <shadedPattern>${shaded.package}.com.google.collect</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.google.protobuf</pattern>
                  <shadedPattern>${shaded.package}.com.google.protobuf</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.calcite.avatica</pattern>
                  <shadedPattern>${shaded.package}.org.apache.calcite.avatica</shadedPattern>
                  <excludes>
                    <exclude>org.apache.calcite.avatica.proto.*</exclude>
                  </excludes>
                </relocation>
                <relocation>
                  <pattern>org.apache.commons</pattern>
                  <shadedPattern>${shaded.package}.org.apache.commons</shadedPattern>
                  <excludes>
                    <exclude>org.apache.commons.logging.**</exclude>
                  </excludes>
                </relocation>
                <relocation>
                  <pattern>org.apache.http</pattern>
                  <shadedPattern>${shaded.package}.org.apache.http</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.fusesource</pattern>
                  <shadedPattern>${shaded.package}.org.fusesource</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.hamcrest</pattern>
                  <shadedPattern>${shaded.package}.org.hamcrest</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.junit</pattern>
                  <shadedPattern>${shaded.package}.org.junit</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>jline</pattern>
                  <shadedPattern>${shaded.package}.jline</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>junit</pattern>
                  <shadedPattern>${shaded.package}.junit</shadedPattern>
                </relocation>
              </relocations>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
        <configuration>
          <excludes>
            <exclude>src/main/resources/META-INF/services/java.sql.Driver</exclude>
          </excludes>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <properties>
    <shaded.package>com.aliyun.phoenix.shaded</shaded.package>
    <protobuf-java.version>3.1.0</protobuf-java.version>
    <top.dir>${project.basedir}/..</top.dir>
  </properties>
</project>
