<?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>airbase</artifactId>
    <groupId>io.airlift</groupId>
    <version>88</version>
    <relativePath>../../pom.xml/pom.xml</relativePath>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.facebook.presto.hadoop</groupId>
  <artifactId>hadoop-apache2</artifactId>
  <name>hadoop-apache2</name>
  <version>3.2.0-1</version>
  <description>Shaded version of Apache Hadoop for Presto</description>
  <url>https://github.com/prestodb/presto-hadoop-apache2</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/prestodb/presto-hadoop-apache2.git</connection>
    <developerConnection>scm:git:git://github.com/prestodb/presto-hadoop-apache2.git</developerConnection>
    <tag>3.2.0-1</tag>
    <url>https://github.com/prestodb/presto-hadoop-apache2</url>
  </scm>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>3.0.0-M1</version>
        </plugin>
        <plugin>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5.3</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>
          <groupId>org.sonatype.plugins</groupId>
          <artifactId>nexus-staging-maven-plugin</artifactId>
          <version>${dep.nexus-staging-plugin.version}</version>
          <extensions>true</extensions>
          <configuration>
            <serverId>ossrh</serverId>
            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>3.0.0-M2</version>
        <executions>
          <execution>
            <phase>verify</phase>
            <goals>
              <goal>enforce</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <rules>
            <requireUpperBoundDeps />
            <banDuplicatePomDependencyVersions />
            <requireMavenVersion>
              <version>3.5.0</version>
            </requireMavenVersion>
            <requireJavaVersion>
              <version>${project.build.targetJdk}</version>
            </requireJavaVersion>
          </rules>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.0</version>
        <configuration>
          <source>${project.build.targetJdk}</source>
          <target>${project.build.targetJdk}</target>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>3.0.0-M3</version>
        <configuration>
          <trimStackTrace>false</trimStackTrace>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.0.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.1.0</version>
        <configuration>
          <source>${project.build.targetJdk}</source>
          <quiet>true</quiet>
          <doclint>-missing</doclint>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>3.2.1</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <createSourcesJar>true</createSourcesJar>
              <shadeSourcesContent>true</shadeSourcesContent>
              <dependencyReducedPomLocation>${project.build.directory}/pom.xml</dependencyReducedPomLocation>
              <promoteTransitiveDependencies>true</promoteTransitiveDependencies>
              <transformers>
                <transformer />
              </transformers>
              <relocations>
                <relocation>
                  <pattern>org.iq80.leveldb</pattern>
                  <shadedPattern>${shadeBase}.org.iq80.leveldb</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.http</pattern>
                  <shadedPattern>${shadeBase}.org.apache.http</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>mozilla</pattern>
                  <shadedPattern>${shadeBase}.org.apache.http.mozilla</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>io.netty</pattern>
                  <shadedPattern>${shadeBase}.io.netty</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.eclipse.jetty</pattern>
                  <shadedPattern>${shadeBase}.org.eclipse.jetty</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.microsoft.azure</pattern>
                  <shadedPattern>${shadeBase}.com.microsoft.azure</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.avro</pattern>
                  <shadedPattern>${shadeBase}.org.apache.avro</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.commons</pattern>
                  <shadedPattern>${shadeBase}.org.apache.commons</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.kerby</pattern>
                  <shadedPattern>${shadeBase}.org.apache.kerby</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.htrace</pattern>
                  <shadedPattern>${shadeBase}.htrace</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.wildfly.openssl</pattern>
                  <shadedPattern>${shadeBase}.org.wildfly.openssl</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>com.google.gson</pattern>
                  <shadedPattern>${shadeBase}.com.google.gson</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.google.re2j</pattern>
                  <shadedPattern>${shadeBase}.com.google.re2j</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.fasterxml.jackson</pattern>
                  <shadedPattern>${shadeBase}.com.fasterxml.jackson</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.codehaus.jackson</pattern>
                  <shadedPattern>${shadeBase}.org.codehaus.jackson</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.ctc.wstx</pattern>
                  <shadedPattern>${shadeBase}.com.ctc.wstx</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.codehaus.stax2</pattern>
                  <shadedPattern>${shadeBase}.org.codehaus.stax2</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.log4j</pattern>
                  <shadedPattern>${shadeBase}.org.apache.log4j</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.slf4j</pattern>
                  <shadedPattern>${shadeBase}.org.slf4j</shadedPattern>
                </relocation>
              </relocations>
              <filters>
                <filter>
                  <artifact>*:*</artifact>
                  <excludes>
                    <exclude>META-INF/maven/**</exclude>
                    <exclude>META-INF/*.SF</exclude>
                    <exclude>META-INF/*.DSA</exclude>
                    <exclude>META-INF/*.RSA</exclude>
                  </excludes>
                </filter>
                <filter>
                  <artifact>org.slf4j:*</artifact>
                  <excludes>
                    <exclude>META-INF/services/**</exclude>
                  </excludes>
                </filter>
                <filter>
                  <artifact>io.netty:netty-all</artifact>
                  <excludes>
                    <exclude>META-INF/io.netty.versions.properties</exclude>
                  </excludes>
                </filter>
                <filter>
                  <artifact>com.fasterxml.jackson.*:*</artifact>
                  <excludes>
                    <exclude>META-INF/services/**</exclude>
                  </excludes>
                </filter>
                <filter>
                  <artifact>com.fasterxml.woodstox:woodstox-core</artifact>
                  <excludes>
                    <exclude>META-INF/services/**</exclude>
                  </excludes>
                </filter>
                <filter>
                  <artifact>org.apache.commons:commons-configuration2</artifact>
                  <excludes>
                    <exclude>*.dtd</exclude>
                  </excludes>
                </filter>
                <filter>
                  <artifact>org.eclipse.jetty:jetty-util</artifact>
                  <excludes>
                    <exclude>about.html</exclude>
                    <exclude>jetty-dir.css</exclude>
                  </excludes>
                </filter>
                <filter>
                  <artifact>org.eclipse.jetty:jetty-util-ajax</artifact>
                  <excludes>
                    <exclude>about.html</exclude>
                  </excludes>
                </filter>
                <filter>
                  <artifact>org.apache.kerby:kerb-simplekdc</artifact>
                  <excludes>
                    <exclude>krb5-template.conf</exclude>
                    <exclude>krb5_udp-template.conf</exclude>
                  </excludes>
                </filter>
                <filter>
                  <artifact>org.apache.kerby:kerb-util</artifact>
                  <excludes>
                    <exclude>ccache.txt</exclude>
                    <exclude>keytab.txt</exclude>
                  </excludes>
                </filter>
                <filter>
                  <artifact>org.apache.htrace:htrace-core4</artifact>
                  <excludes>
                    <exclude>META-INF/services/com.fasterxml.jackson.*</exclude>
                  </excludes>
                </filter>
                <filter>
                  <artifact>org.apache.hadoop:hadoop-common</artifact>
                  <excludes>
                    <exclude>*.h</exclude>
                    <exclude>org/apache/hadoop/util/LineReader.class</exclude>
                    <exclude>org/apache/hadoop/crypto/key/kms/KMSClientProvider.class</exclude>
                    <exclude>org/apache/hadoop/crypto/key/kms/KMSClientProvider$*.class</exclude>
                  </excludes>
                </filter>
                <filter>
                  <artifact>org.apache.hadoop:hadoop-mapreduce-client-core</artifact>
                  <excludes>
                    <exclude>mapred-default.xml.orig</exclude>
                  </excludes>
                </filter>
                <filter>
                  <artifact>${project.groupId}:${project.artifactId}</artifact>
                  <includes>
                    <include>**</include>
                  </includes>
                </filter>
              </filters>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>oss-release</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
          </plugin>
          <plugin>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.4</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
                <configuration>
                  <useAgent>true</useAgent>
                </configuration>
              </execution>
            </executions>
            <configuration>
              <useAgent>true</useAgent>
            </configuration>
          </plugin>
        </plugins>
      </build>
      <properties>
        <skipTests>true</skipTests>
      </properties>
    </profile>
    <profile>
      <id>deploy-to-ossrh</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.6.8</version>
            <extensions>true</extensions>
            <executions>
              <execution>
                <id>injected-nexus-deploy</id>
                <phase>deploy</phase>
                <goals>
                  <goal>deploy</goal>
                </goals>
                <configuration>
                  <serverId>ossrh</serverId>
                  <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                </configuration>
              </execution>
            </executions>
            <configuration>
              <serverId>ossrh</serverId>
              <nexusUrl>https://oss.sonatype.org/</nexusUrl>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  <properties>
    <air.check.skip-dependency>true</air.check.skip-dependency>
    <shadeBase>com.facebook.presto.hadoop.\$internal</shadeBase>
    <project.build.targetJdk>1.8</project.build.targetJdk>
    <air.check.skip-spotbugs>true</air.check.skip-spotbugs>
    <dep.slf4j.version>1.7.25</dep.slf4j.version>
    <air.check.skip-jacoco>true</air.check.skip-jacoco>
    <air.check.skip-pmd>true</air.check.skip-pmd>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <air.check.skip-duplicate-finder>true</air.check.skip-duplicate-finder>
    <air.check.skip-modernizer>true</air.check.skip-modernizer>
    <dep.nexus-staging-plugin.version>1.6.8</dep.nexus-staging-plugin.version>
    <dep.hadoop.version>3.2.0</dep.hadoop.version>
    <air.check.skip-checkstyle>true</air.check.skip-checkstyle>
  </properties>
</project>
