<?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>hive</artifactId>
    <groupId>io.arenadata.hive</groupId>
    <version>2.3.10_arenadata1</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>hive-jdbc</artifactId>
  <name>Hive JDBC</name>
  <build>
    <sourceDirectory>${basedir}/src/java</sourceDirectory>
    <testSourceDirectory>${basedir}/src/test</testSourceDirectory>
    <resources>
      <resource>
        <directory>${basedir}/src/resources</directory>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>3.6.0</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <minimizeJar>${packaging.minimizeJar}</minimizeJar>
              <shadedArtifactAttached>true</shadedArtifactAttached>
              <shadedClassifierName>${hive.jdbc.driver.classifier}</shadedClassifierName>
              <filters>
                <filter>
                  <artifact>io.arenadata.hive.shims:hive-shims-common</artifact>
                  <includes>
                    <include>**</include>
                  </includes>
                </filter>
                <filter>
                  <artifact>io.arenadata.hive.shims:hive-shims-0.23</artifact>
                  <includes>
                    <include>**</include>
                  </includes>
                </filter>
                <filter>
                  <artifact>*:*</artifact>
                  <excludes>
                    <exclude>META-INF/*.SF</exclude>
                    <exclude>META-INF/*.DSA</exclude>
                    <exclude>META-INF/*.RSA</exclude>
                    <exclude>core-default.xml</exclude>
                  </excludes>
                </filter>
              </filters>
              <artifactSet>
                <excludes>
                  <exclude>org.apache.commons:commons-compress</exclude>
                  <exclude>org.apache.hadoop:*</exclude>
                  <exclude>org.apache.hive:hive-vector-code-gen</exclude>
                  <exclude>org.apache.ant:*</exclude>
                  <exclude>junit:*</exclude>
                  <exclude>org.hamcrest:*</exclude>
                  <exclude>org.ow2.asm:*</exclude>
                  <exclude>javax.jms:*</exclude>
                  <exclude>com.sun.jersey:*</exclude>
                  <exclude>com.sun.jersey.contribs:*</exclude>
                  <exclude>org.eclipse.jetty.aggregate:*</exclude>
                  <exclude>org.tukaani:*</exclude>
                  <exclude>io.airlift:*</exclude>
                  <exclude>io.dropwizard.metrics:*</exclude>
                  <exclude>org.apache.velocity:*</exclude>
                  <exclude>net.sf.jpam:*</exclude>
                  <exclude>org.apache.avro:*</exclude>
                  <exclude>org.apache.orc:*</exclude>
                  <exclude>net.sf.opencsv:*</exclude>
                  <exclude>org.antlr:*</exclude>
                  <exclude>org.slf4j:slf4j-log4j12</exclude>
                  <exclude>log4j:*</exclude>
                  <exclude>antlr:*</exclude>
                  <exclude>aopalliance:*</exclude>
                  <exclude>asm:*</exclude>
                  <exclude>com.google.code.gson:*</exclude>
                  <exclude>com.google.inject:*</exclude>
                  <exclude>com.google.inject.extensions:*</exclude>
                  <exclude>com.jamesmurty.utils:*</exclude>
                  <exclude>com.jcraft:*</exclude>
                  <exclude>com.jolbox:*</exclude>
                  <exclude>commons-beanutils:*</exclude>
                  <exclude>commons-cli:*</exclude>
                  <exclude>commons-dbcp:*</exclude>
                  <exclude>commons-digester:*</exclude>
                  <exclude>commons-el:*</exclude>
                  <exclude>commons-httpclient:*</exclude>
                  <exclude>commons-io:*</exclude>
                  <exclude>commons-net:*</exclude>
                  <exclude>commons-pool:*</exclude>
                  <exclude>com.google.code.findbugs:*</exclude>
                  <exclude>com.google.protobuf:*</exclude>
                  <exclude>com.sun.xml.bind:*</exclude>
                  <exclude>com.thoughtworks.paranamer:*</exclude>
                  <exclude>com.twitter:*</exclude>
                  <exclude>com.zaxxer:*</exclude>
                  <exclude>io.netty:*</exclude>
                  <exclude>javax.activation:*</exclude>
                  <exclude>javax.inject:*</exclude>
                  <exclude>javax.jdo:*</exclude>
                  <exclude>javax.mail:*</exclude>
                  <exclude>javax.servlet:*</exclude>
                  <exclude>javax.servlet.jsp:*</exclude>
                  <exclude>javax.transaction:*</exclude>
                  <exclude>javax.xml.*:*</exclude>
                  <exclude>jline:*</exclude>
                  <exclude>joda-time:*</exclude>
                  <exclude>net.java.dev.jets3t:*</exclude>
                  <exclude>org.apache.commons:commons-math3</exclude>
                  <exclude>org.apache.derby:*</exclude>
                  <exclude>org.apache.directory.api:*</exclude>
                  <exclude>org.apache.directory.server:*</exclude>
                  <exclude>org.apache.geronimo.specs:*</exclude>
                  <exclude>org.apache.htrace:*</exclude>
                  <exclude>org.apache.slider:*</exclude>
                  <exclude>org.codehaus.jackson:*</exclude>
                  <exclude>org.codehaus.jettison:*</exclude>
                  <exclude>org.datanucleus:*</exclude>
                  <exclude>org.fusesource.leveldbjni:*</exclude>
                  <exclude>org.htrace:*</exclude>
                  <exclude>org.mortbay.jetty:*</exclude>
                  <exclude>org.xerial.snappy:*</exclude>
                  <exclude>com.tdunning:*</exclude>
                  <exclude>tomcat:*</exclude>
                  <exclude>xmlenc:*</exclude>
                  <exclude>xerces:*</exclude>
                  <exclude>xml-apis:*</exclude>
                </excludes>
              </artifactSet>
              <relocations>
                <relocation>
                  <pattern>org.apache.http</pattern>
                  <shadedPattern>org.apache.hive.org.apache.http</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.thrift</pattern>
                  <shadedPattern>org.apache.hive.org.apache.thrift</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.google.common</pattern>
                  <shadedPattern>org.apache.hive.com.google.common</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.commons</pattern>
                  <shadedPattern>org.apache.hive.org.apache.commons</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.log4j</pattern>
                  <shadedPattern>org.apache.hive.org.apache.log4j</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.slf4j</pattern>
                  <shadedPattern>org.apache.hive.org.slf4j</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.facebook</pattern>
                  <shadedPattern>org.apache.hive.com.facebook</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.zookeeper</pattern>
                  <shadedPattern>org.apache.hive.org.apache.zookeeper</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.curator</pattern>
                  <shadedPattern>org.apache.hive.org.apache.curator</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.beust</pattern>
                  <shadedPattern>org.apache.hive.com.beust</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.lmax</pattern>
                  <shadedPattern>org.apache.hive.com.lmax</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.jamon</pattern>
                  <shadedPattern>org.apache.hive.org.jamon</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>javolution</pattern>
                  <shadedPattern>org.apache.hive.javolution</shadedPattern>
                </relocation>
              </relocations>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>dist</id>
      <properties>
        <packaging.minimizeJar>false</packaging.minimizeJar>
      </properties>
    </profile>
  </profiles>
  <dependencies>
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-common</artifactId>
      <version>2.7.2</version>
      <scope>compile</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-log4j12</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
        <exclusion>
          <artifactId>commons-logging</artifactId>
          <groupId>commmons-logging</groupId>
        </exclusion>
        <exclusion>
          <artifactId>httpcore</artifactId>
          <groupId>org.apache.httpcomponents</groupId>
        </exclusion>
        <exclusion>
          <artifactId>httpclient</artifactId>
          <groupId>org.apache.httpcomponents</groupId>
        </exclusion>
      </exclusions>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>hamcrest-core</artifactId>
          <groupId>org.hamcrest</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-all</artifactId>
      <version>1.9.5</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <properties>
    <packaging.minimizeJar>false</packaging.minimizeJar>
    <hive.path.to.root>..</hive.path.to.root>
  </properties>
</project>
