<?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">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.logicalclocks</groupId>
  <artifactId>service-discovery-client</artifactId>
  <version>0.7</version>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.13.0</version>
        <configuration>
          <source>17</source>
          <target>17</target>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.22.1</version>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>3.6.0</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <artifactSet>
                <excludes>
                  <exclude>org.slf4j:slf4j-api</exclude>
                </excludes>
              </artifactSet>
              <relocations>
                <relocation>
                  <pattern>org/</pattern>
                  <shadedPattern>${shaded.dependency.prefix}.org.</shadedPattern>
                  <excludes>
                    <exclude>org/slf4j/*</exclude>
                    <exclude>org/slf4j/**/*</exclude>
                    <exclude>**/pom.xml</exclude>
                    <exclude>org/ietf/jgss/*</exclude>
                    <exclude>org/omg/**/*</exclude>
                    <exclude>org/w3c/dom/*</exclude>
                    <exclude>org/w3c/dom/**/*</exclude>
                    <exclude>org/xml/sax/*</exclude>
                    <exclude>org/xml/sax/**/*</exclude>
                    <exclude>org/xbill/*</exclude>
                  </excludes>
                </relocation>
                <relocation>
                  <pattern>com/</pattern>
                  <shadedPattern>${shaded.dependency.prefix}.com.</shadedPattern>
                  <excludes>
                    <exclude>com/logicalclocks/*</exclude>
                    <exclude>com/logicalclocks/**/*</exclude>
                    <exclude>com/sun/tools/*</exclude>
                    <exclude>com/sun/javadoc/*</exclude>
                    <exclude>com/sun/security/*</exclude>
                    <exclude>com/sun/jndi/*</exclude>
                    <exclude>com/sun/management/*</exclude>
                    <exclude>com/sun/tools/**/*</exclude>
                    <exclude>com/sun/javadoc/**/*</exclude>
                    <exclude>com/sun/security/**/*</exclude>
                    <exclude>com/sun/jndi/**/*</exclude>
                    <exclude>com/sun/management/**/*</exclude>
                  </excludes>
                </relocation>
                <relocation>
                  <pattern>okio/</pattern>
                  <shadedPattern>${shaded.dependency.prefix}.okio.</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>okhttp3/</pattern>
                  <shadedPattern>${shaded.dependency.prefix}.okhttp3.</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>retrofit2/</pattern>
                  <shadedPattern>${shaded.dependency.prefix}.retrofit2.</shadedPattern>
                </relocation>
              </relocations>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <repositories>
    <repository>
      <releases />
      <snapshots />
      <id>hops-repository</id>
      <name>Hops Repository</name>
      <url>https://archiva.hops.works/repository/Hops/</url>
    </repository>
  </repositories>
  <dependencies>
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <version>1.18.34</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <version>5.1.0</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>apiguardian-api</artifactId>
          <groupId>org.apiguardian</groupId>
        </exclusion>
        <exclusion>
          <artifactId>junit-platform-engine</artifactId>
          <groupId>org.junit.platform</groupId>
        </exclusion>
        <exclusion>
          <artifactId>junit-jupiter-api</artifactId>
          <groupId>org.junit.jupiter</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpcore</artifactId>
      <version>4.4.13</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>5.11.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>
  <distributionManagement>
    <repository>
      <id>Hops</id>
      <name>Hopsworks Maven repository</name>
      <url>https://archiva.hops.works/repository/Hops/</url>
    </repository>
  </distributionManagement>
  <properties>
    <shaded.dependency.prefix>com.logicalclocks.shaded</shaded.dependency.prefix>
  </properties>
</project>
