<?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>de.gematik.pki</groupId>
    <artifactId>gemLibPki</artifactId>
    <version>0.5.2</version>
    <packaging>jar</packaging>
    <description>gematik library PKI</description>
    <name>GemLibPki</name>
    <url>https://github.com/gematik/ref-GemLibPki</url>

    <scm>
        <url>https://github.com/gematik/ref-GemLibPki</url>
        <connection>scm:git:git://github.com/gematik/ref-GemLibPki.git</connection>
        <developerConnection>scm:git:ssh://git@github.com:gematik/ref-GemLibPki.git</developerConnection>
    </scm>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/gematik/ref-GemLibPki/issues</url>
    </issueManagement>

    <organization>
        <name>gematik GmbH</name>
        <url>http://www.gematik.de</url>
    </organization>

    <licenses>
        <license>
            <name>Apache License 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>gematik</name>
            <email>software-development@gematik.de</email>
            <url>https://gematik.github.io/</url>
            <organization>gematik GmbH</organization>
            <organizationUrl>https://www.gematik.de/</organizationUrl>
        </developer>
    </developers>

    <properties>
        <version.java>11</version.java>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <version.maven-clean-plugin>3.1.0</version.maven-clean-plugin>
        <version.maven-compiler-plugin>3.8.1</version.maven-compiler-plugin>
        <version.maven-jar-plugin>3.2.0</version.maven-jar-plugin>
        <version.maven-javadoc-plugin>3.2.0</version.maven-javadoc-plugin>
        <version.maven-resources-plugin>3.2.0</version.maven-resources-plugin>
        <version.maven-source-plugin>3.2.1</version.maven-source-plugin>
        <version.maven-surefire-plugin>3.0.0-M5</version.maven-surefire-plugin>
        <version.lombok>1.18.22</version.lombok>
        <version.bouncycastle.bcpkix>1.70</version.bouncycastle.bcpkix>
        <version.xades4j>1.7.0</version.xades4j>
        <version.xmlunit>2.8.4</version.xmlunit>
        <version.assertj>3.22.0</version.assertj>
        <version.junit-jupiter>5.8.2</version.junit-jupiter>
        <version.unirest-java>1.4.9</version.unirest-java>
        <version.commons-lang3>3.12.0</version.commons-lang3>
        <version.dss-tsl-validation>5.8.d4j.1</version.dss-tsl-validation>
        <version.wiremock-jre8>2.32.0</version.wiremock-jre8>
        <version.maven-site-plugin>3.9.1</version.maven-site-plugin>
        <version.maven-project-info-reports-plugin>3.1.1</version.maven-project-info-reports-plugin>
        <version.jacoco-maven-plugin>0.8.6</version.jacoco-maven-plugin>
        <version.sonar-maven-plugin>3.7.0.1746</version.sonar-maven-plugin>
        <version.nexus-staging-maven-plugin>1.6.7</version.nexus-staging-maven-plugin>
        <version.maven-gpg-plugin>1.6</version.maven-gpg-plugin>
        <version.log4j>2.17.1</version.log4j>

        <!-- settings for upload to sonar server -->
        <sonar.coverage.jacoco.xmlReportPaths>${project.basedir}/target/site/jacoco/index.xml</sonar.coverage.jacoco.xmlReportPaths>
        <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
        <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
        <sonar.language>java</sonar.language>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${version.junit-jupiter}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${version.junit-jupiter}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.mashape.unirest</groupId>
            <artifactId>unirest-java</artifactId>
            <version>${version.unirest-java}</version>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-params</artifactId>
            <version>${version.junit-jupiter}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>${version.junit-jupiter}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>provided</scope>
            <version>${version.lombok}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-slf4j-impl</artifactId>
            <version>${version.log4j}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <version>${version.log4j}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>${version.assertj}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcpkix-jdk15on</artifactId>
            <version>${version.bouncycastle.bcpkix}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>${version.commons-lang3}</version>
        </dependency>

        <dependency>
            <groupId>org.digidoc4j.dss</groupId>
            <artifactId>dss-tsl-validation</artifactId>
            <version>${version.dss-tsl-validation}</version>
        </dependency>

        <dependency>
            <groupId>com.github.tomakehurst</groupId>
            <artifactId>wiremock-jre8</artifactId>
            <version>${version.wiremock-jre8}</version>
            <scope>test</scope>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.xmlunit/xmlunit-core -->
        <dependency>
            <groupId>org.xmlunit</groupId>
            <artifactId>xmlunit-core</artifactId>
            <version>${version.xmlunit}</version>
            <scope>test</scope>
        </dependency>

        <!-- https://mvnrepository.com/artifact/com.googlecode.xades4j/xades4j -->
        <dependency>
            <groupId>com.googlecode.xades4j</groupId>
            <artifactId>xades4j</artifactId>
            <version>${version.xades4j}</version>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-clean-plugin</artifactId>
                <version>${version.maven-clean-plugin}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${version.maven-jar-plugin}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${version.maven-compiler-plugin}</version>
                <configuration>
                    <encoding>${project.build.sourceEncoding}</encoding>
                    <source>${version.java}</source>
                    <target>${version.java}</target>
                    <debug>true</debug>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${version.maven-source-plugin}</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${version.maven-javadoc-plugin}</version>
                <configuration>
                    <doclint>none</doclint>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>${version.maven-site-plugin}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>${version.maven-resources-plugin}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>${version.maven-project-info-reports-plugin}</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${version.maven-surefire-plugin}</version>
            </plugin>

            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${version.jacoco-maven-plugin}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- to upload jacoco results to sonar server via mvn sonar:sonar-->
            <plugin>
                <groupId>org.sonarsource.scanner.maven</groupId>
                <artifactId>sonar-maven-plugin</artifactId>
                <version>${version.sonar-maven-plugin}</version>
            </plugin>

        </plugins>
    </build>

    <profiles>
        <profile>
            <id>external</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${version.maven-gpg-plugin}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>${version.nexus-staging-maven-plugin}</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                            <stagingProgressTimeoutMinutes>20</stagingProgressTimeoutMinutes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    <distributionManagement>
        <repository>
            <id>releases</id>
            <url>${releaseDeploymentRepository}</url>
        </repository>
        <snapshotRepository>
            <id>snapshots</id>
            <url>${snapshotDeploymentRepository}</url>
        </snapshotRepository>
    </distributionManagement>
</project>
