<?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>athenz</artifactId>
    <groupId>com.yahoo.athenz</groupId>
    <version>1.10.9</version>
    <relativePath>../../../../pom.xml</relativePath>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>athenz-zts-java-client</artifactId>
  <name>athenz-zts-java-client</name>
  <description>ZTS Java Client Library</description>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${maven-javadoc-plugin.version}</version>
        <executions>
          <execution>
            <id>javadoc-jar</id>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <source>8</source>
              <includeDependencySources>true</includeDependencySources>
              <dependencySourceIncludes>
                <dependencySourceInclude>com.yahoo.athenz:athenz-zts-java-client-core</dependencySourceInclude>
              </dependencySourceIncludes>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>${maven-shade-plugin.version}</version>
        <executions>
          <execution>
            <id>shade-jar</id>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <createSourcesJar>true</createSourcesJar>
              <shadeSourcesContent>true</shadeSourcesContent>
              <artifactSet>
                <includes>
                  <include>com.yahoo.athenz:athenz-zts-java-client-core</include>
                  <include>org.glassfish.hk2</include>
                  <include>org.glassfish.hk2.external</include>
                  <include>org.glassfish.jersey</include>
                  <include>org.glassfish.jersey.ext</include>
                  <include>org.glassfish.jersey.core</include>
                  <include>org.glassfish.jersey.media</include>
                  <include>org.glassfish.jersey.internal</include>
                  <include>org.glassfish.jersey.inject</include>
                  <include>org.glassfish.jersey.bundles.repackaged</include>
                  <include>com.fasterxml.jackson.core</include>
                  <include>com.fasterxml.jackson.jaxrs</include>
                  <include>com.fasterxml.jackson.module</include>
                  <include>org.glassfish.jersey.connectors</include>
                  <include>org.apache.httpcomponents</include>
                  <include>javax.ws.rs</include>
                  <include>javax.annotation</include>
                  <include>javax.inject</include>
                  <include>jersey.repackaged.com.google.common</include>
                  <include>org.aopalliance</include>
                  <include>commons-codec</include>
                  <include>commons-logging</include>
                </includes>
              </artifactSet>
              <relocations>
                <relocation>
                  <pattern>org.apache.commons</pattern>
                  <shadedPattern>athenz.shade.zts.org.apache.commons</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>javax.inject</pattern>
                  <shadedPattern>athenz.shade.zts.javax.inject</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.aopalliance</pattern>
                  <shadedPattern>athenz.shade.zts.org.aopalliance</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>jersey.repackaged.com.google.common</pattern>
                  <shadedPattern>athenz.shade.zts.jersey.repackaged.com.google.common</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>javax.ws.rs</pattern>
                  <shadedPattern>athenz.shade.zts.javax.ws.rs</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>javax.annotation</pattern>
                  <shadedPattern>athenz.shade.zts.javax.annotation</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.glassfish.jersey</pattern>
                  <shadedPattern>athenz.shade.zts.org.glassfish.jersey</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.httpcomponents</pattern>
                  <shadedPattern>athenz.shade.zts.org.apache.httpcomponents</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.http</pattern>
                  <shadedPattern>athenz.shade.zts.org.apache.http</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>commons-codec</pattern>
                  <shadedPattern>athenz.shade.zts.commons-codec</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>commons-logging</pattern>
                  <shadedPattern>athenz.shade.zts.commons-logging</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.glassfish.hk2</pattern>
                  <shadedPattern>athenz.shade.zts.org.glassfish.hk2</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.glassfish.hk2.external</pattern>
                  <shadedPattern>athenz.shade.zts.org.glassfish.hk2.external</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.jvnet.hk2</pattern>
                  <shadedPattern>athenz.shade.zts.org.jvnet.hk2</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.jvnet.tiger_types</pattern>
                  <shadedPattern>athenz.shade.zts.org.jvnet.tiger_types</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.fasterxml.jackson</pattern>
                  <shadedPattern>athenz.shade.zts.com.fasterxml.jackson</shadedPattern>
                </relocation>
              </relocations>
              <filters>
                <filter>
                  <artifact>*:*</artifact>
                  <excludes>
                    <exclude>META-INF/*.SF</exclude>
                    <exclude>META-INF/*.DSA</exclude>
                    <exclude>META-INF/*.RSA</exclude>
                  </excludes>
                </filter>
              </filters>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>jdk11</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>${maven-compiler-plugin.version}</version>
            <executions>
              <execution>
                <id>jdk11</id>
                <goals>
                  <goal>compile</goal>
                </goals>
                <configuration>
                  <source>11</source>
                  <target>11</target>
                  <release>11</release>
                  <compileSourceRoots>
                    <compileSourceRoot>${project.basedir}/src/main/java11</compileSourceRoot>
                  </compileSourceRoots>
                  <outputDirectory>${project.build.outputDirectory}/META-INF/versions/11</outputDirectory>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-jar-plugin</artifactId>
            <version>${maven-jar-plugin.version}</version>
            <executions>
              <execution>
                <id>default-jar</id>
                <configuration>
                  <archive>
                    <manifestEntries>
                      <Multi-Release>true</Multi-Release>
                    </manifestEntries>
                  </archive>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  <dependencies>
    <dependency>
      <groupId>com.yahoo.athenz</groupId>
      <artifactId>athenz-zts-core</artifactId>
      <version>1.10.9</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.yahoo.athenz</groupId>
      <artifactId>athenz-cert-refresher</artifactId>
      <version>1.10.9</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.yahoo.athenz</groupId>
      <artifactId>athenz-client-common</artifactId>
      <version>1.10.9</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.yahoo.athenz</groupId>
      <artifactId>athenz-auth-core</artifactId>
      <version>1.10.9</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.yahoo.rdl</groupId>
      <artifactId>rdl-java</artifactId>
      <version>1.5.4</version>
      <scope>compile</scope>
      <exclusions>
        <exclusion>
          <artifactId>jackson-databind</artifactId>
          <groupId>com.fasterxml.jackson.core</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jackson-annotations</artifactId>
          <groupId>com.fasterxml.jackson.core</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.amazonaws</groupId>
      <artifactId>aws-java-sdk-sts</artifactId>
      <version>1.11.969</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>jakarta.xml.bind</groupId>
      <artifactId>jakarta.xml.bind-api</artifactId>
      <version>2.3.3</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jaxb</groupId>
      <artifactId>jaxb-runtime</artifactId>
      <version>2.3.3</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>javax.activation</groupId>
      <artifactId>javax.activation-api</artifactId>
      <version>1.2.0</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.7.30</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>1.2.3</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>logback-core</artifactId>
          <groupId>ch.qos.logback</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.testng</groupId>
      <artifactId>testng</artifactId>
      <version>7.4.0</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>jcommander</artifactId>
          <groupId>com.beust</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jquery</artifactId>
          <groupId>org.webjars</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>3.8.0</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>byte-buddy</artifactId>
          <groupId>net.bytebuddy</groupId>
        </exclusion>
        <exclusion>
          <artifactId>byte-buddy-agent</artifactId>
          <groupId>net.bytebuddy</groupId>
        </exclusion>
        <exclusion>
          <artifactId>objenesis</artifactId>
          <groupId>org.objenesis</groupId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.amazonaws</groupId>
        <artifactId>aws-java-sdk-bom</artifactId>
        <version>${aws.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
</project>
