<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://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>com.hortonworks.registries</groupId>
    <artifactId>schema-registry-shaded</artifactId>
    <version>0.9.1</version>
  </parent>
  <groupId>com.hortonworks.registries</groupId>
  <artifactId>jersey-shaded</artifactId>
  <version>0.9.1</version>
  <name>Jersey v2 Relocated Packages</name>
  <licenses>
    <license>
      <name>The Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>
  <properties>
    <shading.prefix>com.hortonworks.registries.shaded</shading.prefix>
  </properties>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <id>jersey-shaded</id>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <shadeSourcesContent>true</shadeSourcesContent>
              <createSourcesJar>true</createSourcesJar>
              <transformers>
                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer" />
              </transformers>
              <relocations>
                <relocation>
                  <pattern>javax.ws.rs</pattern>
                  <shadedPattern>${shading.prefix}.javax.ws.rs</shadedPattern>
                  <includes>
                    <include>javax.ws.rs.**</include>
                  </includes>
                </relocation>
                <relocation>
                  <pattern>org.glassfish</pattern>
                  <shadedPattern>${shading.prefix}.org.glassfish</shadedPattern>
                  <includes>
                    <include>org.glassfish.jersey.**</include>
                    <include>org.glassfish.hk2.**</include>
                  </includes>
                </relocation>
                <relocation>
                  <pattern>org.jvnet.hk2</pattern>
                  <shadedPattern>${shading.prefix}.org.jvnet.hk2</shadedPattern>
                  <includes>
                    <include>org.jvnet.hk2.**</include>
                  </includes>
                </relocation>
                <relocation>
                  <pattern>com.fasterxml.jackson</pattern>
                  <shadedPattern>${shading.prefix}.com.fasterxml.jackson</shadedPattern>
                  <includes>
                    <include>com.fasterxml.jackson.**</include>
                  </includes>
                </relocation>
              </relocations>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <version>${maven-source-plugin.version}</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>copy-dependencies</goal>
            </goals>
            <configuration>
              <classifier>sources</classifier>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>flatten-maven-plugin</artifactId>
        <version>1.2.1</version>
        <executions>
          <execution>
            <id>flatten</id>
            <phase>package</phase>
            <goals>
              <goal>flatten</goal>
            </goals>
            <configuration>
              <flattenMode>resolveCiFriendliesOnly</flattenMode>
              <outputDirectory>${project.build.directory}</outputDirectory>
            </configuration>
          </execution>
          <execution>
            <id>flatten.clean</id>
            <phase>clean</phase>
            <goals>
              <goal>clean</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
