<?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>kyuubi-parent</artifactId>
    <groupId>org.apache.kyuubi</groupId>
    <version>1.4.0-incubating</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>kyuubi-hive-jdbc-shaded</artifactId>
  <name>Kyuubi Project Hive JDBC Shaded Client</name>
  <build>
    <outputDirectory>target/scala-${scala.binary.version}/classes</outputDirectory>
    <testOutputDirectory>target/scala-${scala.binary.version}/test-classes</testOutputDirectory>
    <plugins>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <minimizeJar>true</minimizeJar>
          <createSourcesJar>true</createSourcesJar>
          <shadeSourcesContent>true</shadeSourcesContent>
          <shadedArtifactAttached>false</shadedArtifactAttached>
          <artifactSet>
            <excludes>
              <exclude>org.apache.hadoop:*</exclude>
              <exclude>org.slf4j:*</exclude>
            </excludes>
          </artifactSet>
          <filters>
            <filter>
              <artifact>org.apache.kyuubi:kyuubi-hive-jdbc</artifact>
              <includes>
                <include>**</include>
              </includes>
              <excludes>
                <exclude>META-INF/MANIFEST.MF</exclude>
              </excludes>
            </filter>
            <filter>
              <artifact>commons-codec:commons-codec</artifact>
              <excludes>
                <exclude>META-INF/MANIFEST.MF</exclude>
              </excludes>
            </filter>
            <filter>
              <artifact>commons-lang:commons-lang</artifact>
              <excludes>
                <exclude>META-INF/MANIFEST.MF</exclude>
              </excludes>
            </filter>
            <filter>
              <artifact>com.google.guava:guava</artifact>
              <excludes>
                <exclude>META-INF/MANIFEST.MF</exclude>
              </excludes>
            </filter>
            <filter>
              <artifact>org.apache.hive:hive-metastore</artifact>
              <excludes>
                <exclude>META-INF/MANIFEST.MF</exclude>
                <exclude>package.jdo</exclude>
              </excludes>
            </filter>
            <filter>
              <artifact>org.apache.hive:hive-storage-api</artifact>
              <excludes>
                <exclude>META-INF/MANIFEST.MF</exclude>
              </excludes>
            </filter>
            <filter>
              <artifact>org.apache.hive:hive-service-rpc</artifact>
              <excludes>
                <exclude>META-INF/MANIFEST.MF</exclude>
              </excludes>
            </filter>
            <filter>
              <artifact>org.apache.hive:hive-shims</artifact>
              <excludes>
                <exclude>META-INF/MANIFEST.MF</exclude>
              </excludes>
            </filter>
            <filter>
              <artifact>org.apache.hive.shims:hive-shims-common</artifact>
              <includes>
                <include>**</include>
              </includes>
              <excludes>
                <exclude>META-INF/MANIFEST.MF</exclude>
              </excludes>
            </filter>
            <filter>
              <artifact>org.apache.hive.shims:hive-shims-0.23</artifact>
              <includes>
                <include>**</include>
              </includes>
              <excludes>
                <exclude>META-INF/MANIFEST.MF</exclude>
              </excludes>
            </filter>
            <filter>
              <artifact>org.apache.hive:hive-common</artifact>
              <includes>
                <include>**</include>
              </includes>
              <excludes>
                <exclude>META-INF/MANIFEST.MF</exclude>
              </excludes>
            </filter>
            <filter>
              <artifact>org.apache.hive:hive-serde</artifact>
              <excludes>
                <exclude>META-INF/MANIFEST.MF</exclude>
              </excludes>
            </filter>
            <filter>
              <artifact>org.apache.hive:hive-service</artifact>
              <excludes>
                <exclude>META-INF/MANIFEST.MF</exclude>
                <exclude>hive-webapps/**</exclude>
              </excludes>
            </filter>
            <filter>
              <artifact>org.apache.curator:curator-client</artifact>
              <excludes>
                <exclude>META-INF/MANIFEST.MF</exclude>
              </excludes>
            </filter>
            <filter>
              <artifact>org.apache.curator:curator-framework</artifact>
              <excludes>
                <exclude>META-INF/MANIFEST.MF</exclude>
              </excludes>
            </filter>
            <filter>
              <artifact>org.apache.httpcomponents:httpclient</artifact>
              <excludes>
                <exclude>META-INF/MANIFEST.MF</exclude>
              </excludes>
            </filter>
            <filter>
              <artifact>org.apache.httpcomponents:httpcore</artifact>
              <excludes>
                <exclude>META-INF/MANIFEST.MF</exclude>
              </excludes>
            </filter>
            <filter>
              <artifact>org.apache.thrift:libfb303</artifact>
              <excludes>
                <exclude>META-INF/MANIFEST.MF</exclude>
              </excludes>
            </filter>
            <filter>
              <artifact>org.apache.thrift:libthrift</artifact>
              <excludes>
                <exclude>META-INF/MANIFEST.MF</exclude>
              </excludes>
            </filter>
            <filter>
              <artifact>org.apache.zookeeper:zookeeper</artifact>
              <excludes>
                <exclude>META-INF/MANIFEST.MF</exclude>
                <exclude>LICENSE.txt</exclude>
              </excludes>
            </filter>
            <filter>
              <artifact>*:*</artifact>
              <excludes>
                <exclude>META-INF/*.SF</exclude>
                <exclude>META-INF/*.DSA</exclude>
                <exclude>META-INF/*.RSA</exclude>
                <exclude>META-INF/DEPENDENCIES</exclude>
                <exclude>META-INF/maven/**</exclude>
                <exclude>mozilla/**</exclude>
                <exclude>*.properties</exclude>
              </excludes>
            </filter>
          </filters>
          <relocations>
            <relocation>
              <pattern>com.facebook</pattern>
              <shadedPattern>${kyuubi.shade.packageName}.com.facebook</shadedPattern>
            </relocation>
            <relocation>
              <pattern>com.google.common</pattern>
              <shadedPattern>${kyuubi.shade.packageName}.com.google.common</shadedPattern>
            </relocation>
            <relocation>
              <pattern>org.apache.commons.codec</pattern>
              <shadedPattern>${kyuubi.shade.packageName}.org.apache.commons.codec</shadedPattern>
            </relocation>
            <relocation>
              <pattern>org.apache.commons.lang</pattern>
              <shadedPattern>${kyuubi.shade.packageName}.org.apache.commons.lang</shadedPattern>
            </relocation>
            <relocation>
              <pattern>org.apache.curator</pattern>
              <shadedPattern>${kyuubi.shade.packageName}.org.apache.curator</shadedPattern>
            </relocation>
            <relocation>
              <pattern>org.apache.hadoop.hive</pattern>
              <shadedPattern>${kyuubi.shade.packageName}.org.apache.hadoop.hive</shadedPattern>
            </relocation>
            <relocation>
              <pattern>org.apache.hive</pattern>
              <shadedPattern>${kyuubi.shade.packageName}.org.apache.hive</shadedPattern>
            </relocation>
            <relocation>
              <pattern>org.apache.http</pattern>
              <shadedPattern>${kyuubi.shade.packageName}.org.apache.http</shadedPattern>
            </relocation>
            <relocation>
              <pattern>org.apache.jute</pattern>
              <shadedPattern>${kyuubi.shade.packageName}.org.apache.jute</shadedPattern>
            </relocation>
            <relocation>
              <pattern>org.apache.thrift</pattern>
              <shadedPattern>${kyuubi.shade.packageName}.org.apache.thrift</shadedPattern>
            </relocation>
            <relocation>
              <pattern>org.apache.zookeeper</pattern>
              <shadedPattern>${kyuubi.shade.packageName}.org.apache.zookeeper</shadedPattern>
            </relocation>
          </relocations>
          <transformers>
            <transformer />
            <transformer />
          </transformers>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>compile</id>
            <phase>package</phase>
            <goals>
              <goal>attach-artifact</goal>
            </goals>
            <configuration>
              <artifacts>
                <artifact>
                  <file>${basedir}/target/${project.artifactId}-${project.version}.jar</file>
                  <type>jar</type>
                  <classifier>optional</classifier>
                </artifact>
              </artifacts>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>net.alchim31.maven</groupId>
        <artifactId>scala-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-scaladocs</id>
            <phase>none</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.scalatest</groupId>
        <artifactId>scalatest-maven-plugin</artifactId>
        <configuration>
          <skipTests>true</skipTests>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.scalastyle</groupId>
        <artifactId>scalastyle-maven-plugin</artifactId>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>jcl-over-slf4j</artifactId>
      <version>1.7.30</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.7.30</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-client-api</artifactId>
      <version>3.3.1</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.scalatest</groupId>
      <artifactId>scalatest_2.12</artifactId>
      <version>3.2.9</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>scala-library</artifactId>
          <groupId>org.scala-lang</groupId>
        </exclusion>
        <exclusion>
          <artifactId>scalatest-core_2.12</artifactId>
          <groupId>org.scalatest</groupId>
        </exclusion>
        <exclusion>
          <artifactId>scalatest-featurespec_2.12</artifactId>
          <groupId>org.scalatest</groupId>
        </exclusion>
        <exclusion>
          <artifactId>scalatest-flatspec_2.12</artifactId>
          <groupId>org.scalatest</groupId>
        </exclusion>
        <exclusion>
          <artifactId>scalatest-freespec_2.12</artifactId>
          <groupId>org.scalatest</groupId>
        </exclusion>
        <exclusion>
          <artifactId>scalatest-funsuite_2.12</artifactId>
          <groupId>org.scalatest</groupId>
        </exclusion>
        <exclusion>
          <artifactId>scalatest-funspec_2.12</artifactId>
          <groupId>org.scalatest</groupId>
        </exclusion>
        <exclusion>
          <artifactId>scalatest-propspec_2.12</artifactId>
          <groupId>org.scalatest</groupId>
        </exclusion>
        <exclusion>
          <artifactId>scalatest-refspec_2.12</artifactId>
          <groupId>org.scalatest</groupId>
        </exclusion>
        <exclusion>
          <artifactId>scalatest-wordspec_2.12</artifactId>
          <groupId>org.scalatest</groupId>
        </exclusion>
        <exclusion>
          <artifactId>scalatest-diagrams_2.12</artifactId>
          <groupId>org.scalatest</groupId>
        </exclusion>
        <exclusion>
          <artifactId>scalatest-matchers-core_2.12</artifactId>
          <groupId>org.scalatest</groupId>
        </exclusion>
        <exclusion>
          <artifactId>scalatest-shouldmatchers_2.12</artifactId>
          <groupId>org.scalatest</groupId>
        </exclusion>
        <exclusion>
          <artifactId>scalatest-mustmatchers_2.12</artifactId>
          <groupId>org.scalatest</groupId>
        </exclusion>
        <exclusion>
          <artifactId>scala-reflect</artifactId>
          <groupId>org.scala-lang</groupId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
</project>
