<?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>tech.triviumcapital.clients</groupId>
  <artifactId>trivium-java-sdk</artifactId>
  <name>trivium-java-sdk</name>
  <version>0.2.5</version>
  <description>Java SDK for Trivium API</description>
  <url>https://github.com/trivium-capital/trivium-java-sdk</url>
  <developers>
    <developer>
      <name>William Haw</name>
      <email>william@triviumcapital.tech</email>
      <organization>Trivium</organization>
      <organizationUrl>https://triviumcapital.tech</organizationUrl>
    </developer>
  </developers>
  <licenses>
    <license>
      <name>MIT</name>
      <url>https://github.com/trivium-capital/trivium-java-sdk/blob/main/LICENSE</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <scm>
    <connection>scm:git:git@github.com:trivium-capital/trivium-java-sdk.git</connection>
    <developerConnection>scm:git:git@github.com:trivium-capital/trivium-java-sdk.git</developerConnection>
    <url>scm:git:https://github.com/trivium-capital/trivium-java-sdk</url>
  </scm>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.10.1</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
          <fork>true</fork>
          <meminitial>128m</meminitial>
          <maxmem>512m</maxmem>
          <compilerArgs>
            <arg>-Xlint:all</arg>
            <arg>-J-Xss4m</arg>
          </compilerArgs>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>3.1.0</version>
        <executions>
          <execution>
            <id>enforce-maven</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireMavenVersion>
                  <version>2.2.0</version>
                </requireMavenVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>3.2.5</version>
        <configuration>
          <systemPropertyVariables>
            <property>
              <name>loggerPath</name>
              <value>conf/log4j.properties</value>
            </property>
          </systemPropertyVariables>
          <argLine>-Xms512m -Xmx1500m</argLine>
          <parallel>methods</parallel>
          <threadCount>10</threadCount>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>copy-dependencies</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.directory}/lib</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>3.3.0</version>
        <executions>
          <execution>
            <id>add_sources</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>src/main/java</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.4.1</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <doclint>none</doclint>
          <source>1.8</source>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.2.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.sonatype.central</groupId>
        <artifactId>central-publishing-maven-plugin</artifactId>
        <version>0.5.0</version>
        <extensions>true</extensions>
        <configuration>
          <publishingServerId>central</publishingServerId>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>3.6.0</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <shadeSourcesContent>true</shadeSourcesContent>
              <createSourcesJar>true</createSourcesJar>
              <useDependencyReducedPomInJar>false</useDependencyReducedPomInJar>
              <filters>
                <filter>
                  <artifact>*:*</artifact>
                  <excludes>
                    <exclude>module-info.class</exclude>
                  </excludes>
                </filter>
              </filters>
              <relocations>
                <relocation>
                  <pattern>com.fasterxml.jackson</pattern>
                  <shadedPattern>tech.triviumcapital.clients.java.shaded.com.fasterxml.jackson</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.hc</pattern>
                  <shadedPattern>tech.triviumcapital.clients.java.shaded.org.apache.hc</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>javax.annotation</pattern>
                  <shadedPattern>tech.triviumcapital.clients.java.shaded.javax.annotation</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.openapitools.jackson.nullable</pattern>
                  <shadedPattern>tech.triviumcapital.clients.java.shaded.org.openapitools.jackson.nullable</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.slf4j</pattern>
                  <shadedPattern>tech.triviumcapital.clients.java.shaded.org.slf4j</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>javax.activation</pattern>
                  <shadedPattern>tech.triviumcapital.clients.java.shaded.javax.activation</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>javax.xml.bind</pattern>
                  <shadedPattern>tech.triviumcapital.clients.java.shaded.javax.xml.bind</shadedPattern>
                </relocation>
              </relocations>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>sign-artifacts</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>3.0.1</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
                <configuration>
                  <keyname>${gpg.keyname}</keyname>
                  <passphraseServerId>${gpg.keyname}</passphraseServerId>
                  <gpgArguments>
                    <arg>--pinentry-mode</arg>
                    <arg>loopback</arg>
                  </gpgArguments>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  <dependencies>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <version>5.10.2</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>opentest4j</artifactId>
          <groupId>org.opentest4j</groupId>
        </exclusion>
        <exclusion>
          <artifactId>junit-platform-commons</artifactId>
          <groupId>org.junit.platform</groupId>
        </exclusion>
        <exclusion>
          <artifactId>apiguardian-api</artifactId>
          <groupId>org.apiguardian</groupId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
  <properties>
    <jackson-version>2.17.1</jackson-version>
    <httpclient-version>5.2.1</httpclient-version>
    <jackson-databind-version>2.17.1</jackson-databind-version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <junit-version>5.10.2</junit-version>
    <jackson-databind-nullable-version>0.2.6</jackson-databind-nullable-version>
    <jakarta-annotation-version>1.3.5</jakarta-annotation-version>
  </properties>
</project>
