<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
         xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.apache.hive</groupId>
    <artifactId>hive</artifactId>
    <version>3.1.3.556-eep-922</version>
  </parent>

  <!-- This is required as long as we have avatica version 1.8.0. Because in 1.8.0, jackson dependencies
    are included into avatica fat jar as they are, this causes classpath issue with Oozie.
    In newer versions, jackson dependencies are already shaded. If you upgrade avatica, use it directly. -->
  <groupId>org.apache.hive.shaded.avatica</groupId>
  <artifactId>mapr-shaded-avatica</artifactId>
  <name>MapR Shaded Avatica</name>

  <properties>
    <hive.path.to.root>..</hive.path.to.root>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.apache.calcite.avatica</groupId>
      <artifactId>avatica</artifactId>
      <version>${avatica.version}</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <skipAssembly>true</skipAssembly>
          <tarLongFileMode>posix</tarLongFileMode>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-gpg-plugin</artifactId>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <minimizeJar>false</minimizeJar>
              <createDependencyReducedPom>false</createDependencyReducedPom>
              <relocations>
                <relocation>
                  <pattern>com.fasterxml.jackson</pattern>
                  <shadedPattern>org.apache.hive.shaded.com.fasterxml.jackson</shadedPattern>
                </relocation>
              </relocations>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
