<?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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.opentmf.client</groupId>
  <artifactId>opentmf-http-clients</artifactId>
  <name>opentmf-http-clients</name>
  <version>2.1.3</version>

  <packaging>pom</packaging>
  <modules>
    <module>opentmf-http-clients-common</module>
    <module>opentmf-http-clients-rest</module>
    <module>opentmf-http-clients-reactive</module>
    <module>opentmf-http-clients-bearer-provider</module>
    <module>opentmf-http-clients-autoconfigure</module>
    <module>opentmf-http-clients-starter-rest</module>
    <module>opentmf-http-clients-starter-reactive</module>
    <module>opentmf-http-clients-starter</module>
    <module>opentmf-http-clients-tests</module>
  </modules>

  <description>
    General purpose HTTP client libraries with cached token support.
    Supports both reactive (WebClient) and synchronous (RestTemplate) clients
    with pluggable HTTP implementations.
  </description>

  <url>https://github.com/opentmf/opentmf-http-clients</url>

  <organization>
    <name>PiA Group</name>
    <url>https://www.pia-group.net/</url>
  </organization>

  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
      <comments>A permissive open-source license</comments>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>gokhanus</id>
      <name>Gokhan Demir</name>
      <email>gokhan@opentmf.org</email>
    </developer>
    <developer>
      <id>yusuf-bozkurt</id>
      <name>Yusuf Bozkurt</name>
      <email>yusuf.bozkurt@pia-team.com</email>
    </developer>
    <developer>
      <id>cezmi-aslan</id>
      <name>Cezmi Aslan</name>
      <email>cezmi.aslan@pia-team.com</email>
    </developer>
    <developer>
      <id>abdullahbeker</id>
      <name>Abdullah Beker</name>
      <email>abdullah.beker@dnext-technology.com</email>
    </developer>
    <developer>
      <id>sezer</id>
      <name>Sezer Aydin</name>
      <email>sezer.aydin@pia-team.com</email>
    </developer>
  </developers>

  <properties>
    <java.version>17</java.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>${java.version}</maven.compiler.source>
    <maven.compiler.target>${java.version}</maven.compiler.target>

    <spring-boot.version>4.0.5</spring-boot.version>
    <opentmf-commons.version>2.1.0</opentmf-commons.version>
    <opentmf-mockserver.version>2.1.2</opentmf-mockserver.version>
    <logbook.version>4.0.2</logbook.version>

    <archunit-junit5.version>1.4.1</archunit-junit5.version>

    <maven-deploy-plugin.version>3.1.4</maven-deploy-plugin.version>
    <maven-surefire-plugin.version>3.5.5</maven-surefire-plugin.version>
    <maven-failsafe-plugin.version>3.5.5</maven-failsafe-plugin.version>
    <maven-javadoc-plugin.version>3.12.0</maven-javadoc-plugin.version>
    <maven-source-plugin.version>3.4.0</maven-source-plugin.version>
    <maven-enforcer-plugin.version>3.6.2</maven-enforcer-plugin.version>
    <maven-release-plugin.version>3.3.1</maven-release-plugin.version>
    <jacoco-maven-plugin.version>0.8.14</jacoco-maven-plugin.version>
    <maven-gpg-plugin.version>3.2.8</maven-gpg-plugin.version>
    <central-publishing-maven-plugin.version>0.10.0</central-publishing-maven-plugin.version>

    <sonar-plugin.version>5.5.0.6356</sonar-plugin.version>
    <sonar.java.source>${java.version}</sonar.java.source>
    <sonar.java.target>${java.version}</sonar.java.target>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-dependencies</artifactId>
        <scope>import</scope>
        <type>pom</type>
        <version>${spring-boot.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <!-- Optional Dependencies -->
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-configuration-processor</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <optional>true</optional>
    </dependency>

    <!-- Test Scope Dependencies -->
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-validation</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.projectreactor</groupId>
      <artifactId>reactor-test</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.tngtech.archunit</groupId>
      <artifactId>archunit-junit5</artifactId>
      <scope>test</scope>
      <version>${archunit-junit5.version}</version>
    </dependency>
    <dependency>
      <groupId>org.awaitility</groupId>
      <artifactId>awaitility</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.opentmf.mockserver</groupId>
      <artifactId>opentmf-mockserver</artifactId>
      <scope>test</scope>
      <version>${opentmf-mockserver.version}</version>
    </dependency>
  </dependencies>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>${maven-enforcer-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${maven-surefire-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-failsafe-plugin</artifactId>
          <version>${maven-failsafe-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>${maven-source-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>${maven-javadoc-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>${maven-release-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>${maven-deploy-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>${jacoco-maven-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.sonarsource.scanner.maven</groupId>
          <artifactId>sonar-maven-plugin</artifactId>
          <version>${sonar-plugin.version}</version>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce-maven</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireJavaVersion>
                  <version>${java.version}</version>
                </requireJavaVersion>
                <requireMavenVersion>
                  <version>3.6.3</version>
                </requireMavenVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <configuration>
          <useReleaseProfile>false</useReleaseProfile>
          <releaseProfiles>release</releaseProfiles>
          <goals>deploy</goals>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>jacoco-maven-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
            <id>prepare-agent</id>
          </execution>
          <execution>
            <goals>
              <goal>report</goal>
            </goals>
            <id>report</id>
          </execution>
          <execution>
            <configuration>
              <haltOnFailure>true</haltOnFailure>
              <excludes>
                <exclude>**/*Application.*</exclude>
              </excludes>
              <rules>
                <rule>
                  <element>BUNDLE</element>
                  <limits>
                    <limit>
                      <counter>LINE</counter>
                      <minimum>80%</minimum>
                      <value>COVEREDRATIO</value>
                    </limit>
                    <limit>
                      <counter>INSTRUCTION</counter>
                      <minimum>80%</minimum>
                      <value>COVEREDRATIO</value>
                    </limit>
                    <limit>
                      <counter>BRANCH</counter>
                      <minimum>80%</minimum>
                      <value>COVEREDRATIO</value>
                    </limit>
                    <limit>
                      <counter>CLASS</counter>
                      <maximum>0</maximum>
                      <value>MISSEDCOUNT</value>
                    </limit>
                  </limits>
                </rule>
              </rules>
            </configuration>
            <goals>
              <goal>check</goal>
            </goals>
            <id>coverage-check</id>
          </execution>
        </executions>
        <groupId>org.jacoco</groupId>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
                <configuration>
                  <failOnWarnings>false</failOnWarnings>
                  <failOnError>false</failOnError>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>${maven-gpg-plugin.version}</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.sonatype.central</groupId>
            <artifactId>central-publishing-maven-plugin</artifactId>
            <version>${central-publishing-maven-plugin.version}</version>
            <extensions>true</extensions>
            <configuration>
              <publishingServerId>publish-to-central</publishingServerId>
              <autoPublish>true</autoPublish>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <scm>
    <url>https://github.com/opentmf/opentmf-http-clients</url>
    <connection>scm:git:git@github.com:opentmf/opentmf-http-clients.git</connection>
    <developerConnection>scm:git:git@github.com:opentmf/opentmf-http-clients.git</developerConnection>
    <tag>opentmf-http-clients-2.1.3</tag>
  </scm>

</project>
