<?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>ozone</artifactId>
    <groupId>org.apache.ozone</groupId>
    <version>1.3.0</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>ozone-filesystem-hadoop3-client</artifactId>
  <name>Apache Ozone FS Hadoop shaded 3.x compatibility</name>
  <version>1.3.0</version>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>include-dependencies</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>unpack</goal>
            </goals>
            <configuration>
              <excludes>META-INF/versions/**/*.*</excludes>
              <artifactItems>
                <artifactItem>
                  <groupId>org.apache.ozone</groupId>
                  <artifactId>ozone-filesystem-shaded</artifactId>
                  <version>${project.version}</version>
                </artifactItem>
              </artifactItems>
              <outputDirectory>target/classes</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <transformers>
                <transformer>
                  <resources>
                    <resource>META-INF/BC1024KE.DSA</resource>
                    <resource>META-INF/BC2048KE.DSA</resource>
                    <resource>META-INF/BC1024KE.SF</resource>
                    <resource>META-INF/BC2048KE.SF</resource>
                  </resources>
                </transformer>
                <transformer />
                <transformer>
                  <resource>ozone-default-generated.xml</resource>
                </transformer>
              </transformers>
              <relocations>
                <relocation>
                  <pattern>com.google.protobuf</pattern>
                  <shadedPattern>org.apache.hadoop.shaded.com.google.protobuf</shadedPattern>
                  <includes>
                    <include>com.google.protobuf.*</include>
                  </includes>
                </relocation>
              </relocations>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>com.github.spotbugs</groupId>
        <artifactId>spotbugs-maven-plugin</artifactId>
        <configuration>
          <onlyAnalyze>org.apache.hadoop.fs.ozone.*</onlyAnalyze>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
