<?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>hbase-thirdparty</artifactId>
    <groupId>org.apache.hbase.thirdparty</groupId>
    <version>4.1.1</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>hbase-shaded-netty</artifactId>
  <name>Apache HBase Relocated (Shaded) Netty Libs</name>
  <description>Pulls down netty.io, relocates nd then makes a fat new jar with them all in it.</description>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <configuration>
          <filesets>
            <fileset>
              <directory>${basedir}</directory>
              <includes>
                <include>dependency-reduced-pom.xml</include>
              </includes>
            </fileset>
          </filesets>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <shadeSourcesContent>true</shadeSourcesContent>
              <createSourcesJar>true</createSourcesJar>
              <relocations>
                <relocation>
                  <pattern>io.netty</pattern>
                  <shadedPattern>${rename.offset}.io.netty</shadedPattern>
                </relocation>
              </relocations>
              <artifactSet>
                <excludes>
                  <exclude>com.google.protobuf:protobuf-java</exclude>
                  <exclude>com.google.code.findbugs:jsr305</exclude>
                  <exclude>com.google.errorprone:error_prone_annotations</exclude>
                  <exclude>com.google.j2objc:j2objc-annotations</exclude>
                  <exclude>org.codehaus.mojo:animal-sniffer-annotations</exclude>
                  <exclude>org.codehaus.mojo:animal-sniffer-annotations</exclude>
                </excludes>
              </artifactSet>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>unpack</id>
            <phase>package</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <target>
                <echo />
                <unzip />
                <echo />
                <move />
                <move />
                <echo />
                <move />
                <move />
                <echo />
                <jar />
              </target>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
