<?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>oss-parent</artifactId>
    <groupId>org.sonatype.oss</groupId>
    <version>7</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.facebook.presto.hive</groupId>
  <artifactId>hive-apache</artifactId>
  <name>hive-apache</name>
  <version>0.4</version>
  <description>Shaded version of Apache Hive for Presto</description>
  <url>https://github.com/facebook/presto-hive-apache</url>
  <inceptionYear>2013</inceptionYear>
  <licenses>
    <license>
      <name>Apache License 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <scm>
    <connection>scm:git:git://github.com/facebook/presto-hive-apache.git</connection>
    <developerConnection>scm:git:git://github.com/facebook/presto-hive-apache.git</developerConnection>
    <tag>0.4</tag>
    <url>https://github.com/facebook/presto-hive-apache</url>
  </scm>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.3.2</version>
          <configuration>
            <mavenExecutorId>forked-path</mavenExecutorId>
            <pushChanges>false</pushChanges>
            <localCheckout>true</localCheckout>
            <useReleaseProfile>false</useReleaseProfile>
            <preparationGoals>clean install</preparationGoals>
            <autoVersionSubmodules>true</autoVersionSubmodules>
            <tagNameFormat>@{project.version}</tagNameFormat>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>1.4</version>
          <configuration>
            <useAgent>true</useAgent>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.9</version>
          <configuration>
            <source>${project.build.targetJdk}</source>
            <additionalparam>-quiet</additionalparam>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>1.2</version>
        <executions>
          <execution>
            <phase>verify</phase>
            <goals>
              <goal>enforce</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <rules>
            <requireJavaVersion>
              <version>${project.build.targetJdk}</version>
            </requireJavaVersion>
          </rules>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.1</version>
        <configuration>
          <source>${project.build.targetJdk}</source>
          <target>${project.build.targetJdk}</target>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.12.4</version>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <version>2.2.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>1.6</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <createSourcesJar>true</createSourcesJar>
              <keepDependenciesWithProvidedScope>false</keepDependenciesWithProvidedScope>
              <relocations>
                <relocation>
                  <pattern>org.apache.commons</pattern>
                  <shadedPattern>${shadeBase}.org.apache.commons</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.thrift</pattern>
                  <shadedPattern>${shadeBase}.org.apache.thrift</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.facebook.fb303</pattern>
                  <shadedPattern>${shadeBase}.com.facebook.fb303</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.google.common</pattern>
                  <shadedPattern>${shadeBase}.com.google.common</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.google.protobuf</pattern>
                  <shadedPattern>${shadeBase}.com.google.protobuf</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.iq80.snappy</pattern>
                  <shadedPattern>${shadeBase}.org.iq80.snappy</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.json</pattern>
                  <shadedPattern>${shadeBase}.org.json</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.slf4j</pattern>
                  <shadedPattern>${shadeBase}.org.slf4j</shadedPattern>
                </relocation>
              </relocations>
              <filters>
                <filter>
                  <artifact>org.slf4j:*</artifact>
                  <excludes>
                    <exclude>META-INF/maven/**</exclude>
                    <exclude>META-INF/services/**</exclude>
                  </excludes>
                </filter>
                <filter>
                  <artifact>org.apache.hive:hive-metastore</artifact>
                  <excludes>
                    <exclude>package.jdo</exclude>
                  </excludes>
                </filter>
                <filter>
                  <artifact>org.apache.hive:hive-exec</artifact>
                  <excludes>
                    <exclude>org/apache/hadoop/hive/ql/io/CodecPool.class</exclude>
                    <exclude>javaewah/**</exclude>
                    <exclude>javax/realtime/**</exclude>
                    <exclude>javolution/**</exclude>
                    <exclude>org/apache/avro/**</exclude>
                    <exclude>*.properties</exclude>
                  </excludes>
                </filter>
              </filters>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-core</artifactId>
      <version>0.20.2</version>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <artifactId>xmlenc</artifactId>
          <groupId>xmlenc</groupId>
        </exclusion>
        <exclusion>
          <artifactId>commons-cli</artifactId>
          <groupId>commons-cli</groupId>
        </exclusion>
        <exclusion>
          <artifactId>commons-httpclient</artifactId>
          <groupId>commons-httpclient</groupId>
        </exclusion>
        <exclusion>
          <artifactId>commons-codec</artifactId>
          <groupId>commons-codec</groupId>
        </exclusion>
        <exclusion>
          <artifactId>commons-net</artifactId>
          <groupId>commons-net</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jetty</artifactId>
          <groupId>org.mortbay.jetty</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jetty-util</artifactId>
          <groupId>org.mortbay.jetty</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jasper-runtime</artifactId>
          <groupId>tomcat</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jasper-compiler</artifactId>
          <groupId>tomcat</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jsp-api-2.1</artifactId>
          <groupId>org.mortbay.jetty</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jsp-2.1</artifactId>
          <groupId>org.mortbay.jetty</groupId>
        </exclusion>
        <exclusion>
          <artifactId>commons-el</artifactId>
          <groupId>commons-el</groupId>
        </exclusion>
        <exclusion>
          <artifactId>core</artifactId>
          <groupId>org.eclipse.jdt</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jets3t</artifactId>
          <groupId>net.java.dev.jets3t</groupId>
        </exclusion>
        <exclusion>
          <artifactId>commons-net</artifactId>
          <groupId>commons-net</groupId>
        </exclusion>
        <exclusion>
          <artifactId>servlet-api-2.5</artifactId>
          <groupId>org.mortbay.jetty</groupId>
        </exclusion>
        <exclusion>
          <artifactId>kfs</artifactId>
          <groupId>net.sf.kosmosfs</groupId>
        </exclusion>
        <exclusion>
          <artifactId>hsqldb</artifactId>
          <groupId>hsqldb</groupId>
        </exclusion>
        <exclusion>
          <artifactId>oro</artifactId>
          <groupId>oro</groupId>
        </exclusion>
        <exclusion>
          <artifactId>junit</artifactId>
          <groupId>junit</groupId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.datanucleus</groupId>
        <artifactId>datanucleus-enhancer</artifactId>
        <version>3.1.1</version>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <properties>
    <dep.slf4j.version>1.6.6</dep.slf4j.version>
    <dep.hive.version>0.11.0</dep.hive.version>
    <project.build.targetJdk>1.7</project.build.targetJdk>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <shadeBase>com.facebook.presto.hive.shaded</shadeBase>
  </properties>
</project>

