<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://maven.apache.org/POM/4.0.0"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <groupId>com.descope</groupId>
    <artifactId>java-sdk</artifactId>
    <modelVersion>4.0.0</modelVersion>
    <version>1.0.57</version>
    <name>${project.groupId}:${project.artifactId}</name>
    <description>Java library used to integrate with Descope.</description>
    <url>https://github.com/descope/descope-java</url>
    <properties>
        <org.projectlombok.version>1.18.38</org.projectlombok.version>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    <licenses>
        <license>
            <name>MIT License</name>
            <url>http://www.opensource.org/licenses/mit-license.php</url>
        </license>
    </licenses>
    <developers>
        <developer>
            <id>descope</id>
            <name>Descope, Inc.</name>
        </developer>
    </developers>
    <dependencies>
        <!--  JWT  -->
        <dependency>
            <artifactId>jjwt-api</artifactId>
            <groupId>io.jsonwebtoken</groupId>
            <version>0.13.0</version>
        </dependency>
        <dependency>
            <artifactId>jjwt-impl</artifactId>
            <groupId>io.jsonwebtoken</groupId>
            <scope>runtime</scope>
            <version>0.13.0</version>
        </dependency>
        <dependency>
            <artifactId>jjwt-jackson</artifactId>
            <groupId>io.jsonwebtoken</groupId>
            <scope>runtime</scope>
            <version>0.13.0</version>
        </dependency>
        <dependency>
            <artifactId>bcprov-jdk18on</artifactId>
            <groupId>org.bouncycastle</groupId>
            <scope>runtime</scope>
            <version>1.81</version>
        </dependency>

        <!--  LOMBOK  -->
        <dependency>
            <artifactId>lombok</artifactId>
            <groupId>org.projectlombok</groupId>
            <scope>provided</scope>
            <version>${org.projectlombok.version}</version>
        </dependency>

        <!--  LOGGING  -->
        <dependency>
            <artifactId>slf4j-api</artifactId>
            <groupId>org.slf4j</groupId>
            <version>2.0.17</version>
        </dependency>

        <!--  DOTENV   -->
        <dependency>
            <groupId>io.github.cdimascio</groupId>
            <artifactId>dotenv-java</artifactId>
            <version>2.3.2</version>
        </dependency>

        <!--  TESTING  -->
        <dependency>
            <artifactId>assertj-core</artifactId>
            <groupId>org.assertj</groupId>
            <scope>test</scope>
            <version>3.27.4</version>
        </dependency>
        <dependency>
            <artifactId>junit-jupiter</artifactId>
            <groupId>org.junit.jupiter</groupId>
            <scope>test</scope>
            <version>5.11.3</version>
        </dependency>
        <dependency>
            <groupId>org.junit-pioneer</groupId>
            <artifactId>junit-pioneer</artifactId>
            <version>1.9.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <artifactId>mockito-junit-jupiter</artifactId>
            <groupId>org.mockito</groupId>
            <scope>test</scope>
            <version>4.11.0</version>
        </dependency>
        <dependency>
            <artifactId>mockito-inline</artifactId>
            <groupId>org.mockito</groupId>
            <scope>test</scope>
            <version>4.11.0</version>
        </dependency>
        <dependency>
            <groupId>uk.org.webcompere</groupId>
            <artifactId>system-stubs-core</artifactId>
            <version>2.0.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>uk.org.webcompere</groupId>
            <artifactId>system-stubs-jupiter</artifactId>
            <version>2.1.8</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>1.19.0</version>
            <scope>test</scope>
        </dependency>
        <!--  UTILS  -->
        <dependency>
            <artifactId>commons-lang3</artifactId>
            <groupId>org.apache.commons</groupId>
            <version>3.18.0</version>
        </dependency>
        <dependency>
            <artifactId>commons-collections4</artifactId>
            <groupId>org.apache.commons</groupId>
            <version>4.5.0</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.20.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents.client5</groupId>
            <artifactId>httpclient5</artifactId>
            <version>5.5</version>
        </dependency>
        <dependency>
            <artifactId>jackson-databind</artifactId>
            <groupId>com.fasterxml.jackson.core</groupId>
            <version>2.19.2</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <artifactId>jackson-dataformat-yaml</artifactId>
            <groupId>com.fasterxml.jackson.dataformat</groupId>
            <version>2.19.2</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <finalName>${project.groupId}.${project.artifactId}-${project.version}</finalName>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.honton.chas</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>0.0.6</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>3.6.0</version>
                <configuration>
                    <configLocation>checkstyle.xml</configLocation>
                    <consoleOutput>true</consoleOutput>
                    <failsOnError>true</failsOnError>
                    <linkXRef>false</linkXRef>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <groupId>org.apache.maven.plugins</groupId>
                <version>3.14.0</version>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                    <annotationProcessorPaths>
                        <path>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                            <version>${org.projectlombok.version}</version>
                        </path>
                    </annotationProcessorPaths>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <configuration>
                    <encoding>UTF-8</encoding>
                </configuration>
                <groupId>org.apache.maven.plugins</groupId>
                <version>3.3.1</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.4.2</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.5.3</version>
            </plugin>
        </plugins>
    </build>
    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>
    <scm>
        <connection>scm:git:https://github.com/descope/descope-java.git</connection>
        <url>https://github.com/descope/descope-java.git</url>
        <developerConnection>scm:git:https://github.com/descope/descope-java.git</developerConnection>
        <tag>HEAD</tag>
    </scm>
    <profiles>
        <profile>
            <id>ci</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>0.8.0</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>central</publishingServerId>
                            <autoPublish>true</autoPublish>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.3.1</version>
                        <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>
                        <version>3.11.3</version>
                        <configuration>
                            <detectJavaApiLink>false</detectJavaApiLink>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.2.8</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <configuration>
                                    <gpgArguments>
                                        <arg>--batch</arg>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>