<?xml version="1.0" encoding="UTF-8"?>

<!--
SPDX-FileCopyrightText: 2022 FIT-Connect contributors <fit-connect@fitko.de>

SPDX-License-Identifier: CC0-1.0
-->

<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>dev.fitko.fitconnect</groupId>
    <artifactId>jwkvalidator</artifactId>
    <version>2.1.1</version>
    <packaging>jar</packaging>

    <name>JWK-Validator</name>
    <description>Library for validation of JWKs in the context of FIT-Connect</description>
    <url>https://git.fitko.de/fit-connect/jwk-validator</url>

    <licenses>
        <license>
            <name>EUPL-1.2</name>
            <url>https://joinup.ec.europa.eu/page/eupl-text-11-12</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>FIT-Connect Contributors</name>
            <email>fit-connect@fitko.de</email>
            <organization>FITKO</organization>
            <organizationUrl>https://www.fitko.de</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:https://git.fitko.de/fit-connect/jwk-validator.git</connection>
        <developerConnection>scm:git:https://git.fitko.de/fit-connect/jwk-validator.git</developerConnection>
        <url>https://git.fitko.de/fit-connect/jwk-validator</url>
    </scm>

    <properties>
        <java.version>11</java.version>
        <encoding>UTF-8</encoding>
        <project.build.sourceEncoding>${encoding}</project.build.sourceEncoding>
        <project.reporting.outputEncoding>${encoding}</project.reporting.outputEncoding>
        <maven.compiler.release>${java.version}</maven.compiler.release>

        <!-- DEPENDENCIES -->
        <bouncycastle.version>1.78.1</bouncycastle.version>
        <nimbusds.version>9.40</nimbusds.version>
        <slf4j.version>1.7.36</slf4j.version>
        <!-- Test only -->
        <awaitility.version>4.2.1</awaitility.version>
        <junit.version>5.10.2</junit.version>
        <mockito.version>5.12.0</mockito.version>

        <!-- PLUGINS -->
        <!-- Deployment -->
        <maven.gpg-plugin>3.2.4</maven.gpg-plugin>
        <maven.javadoc-plugin>3.7.0</maven.javadoc-plugin>
        <maven.source-plugin>3.3.1</maven.source-plugin>
        <sonatype.nexus-staging-maven-plugin>1.7.0</sonatype.nexus-staging-maven-plugin>
        <!-- Testing -->
        <maven.surefire-plugin>3.3.0</maven.surefire-plugin>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcpkix-jdk18on</artifactId>
            <version>${bouncycastle.version}</version>
        </dependency>
        <dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcprov-jdk18on</artifactId>
            <version>${bouncycastle.version}</version>
        </dependency>
        <dependency>
            <groupId>com.nimbusds</groupId>
            <artifactId>nimbus-jose-jwt</artifactId>
            <version>${nimbusds.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
        <!--Test only-->
        <dependency>
            <groupId>org.awaitility</groupId>
            <artifactId>awaitility</artifactId>
            <version>${awaitility.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>${mockito.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-junit-jupiter</artifactId>
            <version>${mockito.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <!-- deployment -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>${maven.gpg-plugin}</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven.javadoc-plugin}</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${maven.source-plugin}</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>${sonatype.nexus-staging-maven-plugin}</version>
                <extensions>true</extensions>
                <executions>
                    <execution>
                        <id>default-deploy</id>
                        <phase>deploy</phase>
                        <goals>
                            <goal>deploy</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
            <!-- testing -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven.surefire-plugin}</version>
                <configuration>
                    <failIfNoTests>true</failIfNoTests>
                </configuration>
            </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>

</project>
