<?xml version="1.0" encoding="UTF-8"?>
<!--
    Copyright Germany 2024 Governikus GmbH & Co. KG

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->
<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.governikus.panstar.sdk</groupId>
    <artifactId>panstar-sdk</artifactId>
    <packaging>pom</packaging>
    <version>4.1.0</version>

    <modules>
        <module>panstar-utils</module>
        <module>panstar-soap-sdk</module>
        <module>panstar-saml-sdk</module>
        <module>panstar-sdk-classpath-test</module>
    </modules>

    <description>
        This project is an SDK for performing eID identification with the Governikus ID Panstar.
    </description>

    <url>https://gitlab.opencode.de/governikus/id-panstar-sdk</url>

    <scm>
        <!-- When preparing a release, add -DscmConnection=scm:hg:... -->
        <connection>${scmConnection}</connection>
        <tag>panstar-sdk-4.1.0</tag>
        <url>https://gitlab.opencode.de/governikus/id-panstar-sdk</url>
    </scm>

    <repositories>
        <repository>
            <id>Shibboleth</id>
            <name>Shibboleth Repository</name>
            <url>https://build.shibboleth.net/maven/releases/</url>
        </repository>
    </repositories>

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

    <developers>
        <developer>
            <name>Governikus</name>
            <email>autent@governikus.de</email>
            <organization>Governikus</organization>
            <url>https://www.governikus.de</url>
        </developer>
    </developers>

    <properties>
        <!-- Java version -->
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>

        <!-- Maven version -->
        <maven.minimum.version>3.5.4</maven.minimum.version>

        <!-- Encodings -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <!-- Sonar/Reporting settings -->
        <sonar.java.source>${maven.compiler.source}</sonar.java.source>
        <sonar.junit.reportPaths>${project.build.directory}/surefire-reports</sonar.junit.reportPaths>

        <!-- the surefire ${argLine} property, use for ${jacoco.agent.argLine} property in the coverage profile  -->
        <argLineTestExec>-Xmx1024m</argLineTestExec>

        <!-- Tells Sonar where the dependency-check report file is located, for
			the dependency-check-sonar-plugin https://github.com/stevespringett/dependency-check-sonar-plugin -->
        <sonar.dependencyCheck.reportPath>${project.build.directory}/dependency-check-report.xml
        </sonar.dependencyCheck.reportPath>
        <sonar.dependencyCheck.htmlReportPath>${project.build.directory}/dependency-check-report.html
        </sonar.dependencyCheck.htmlReportPath>

        <!-- dependency check properties -->
        <dependency-check-format>ALL</dependency-check-format>
        <!--suppress UnresolvedMavenProperty -->
        <formatter-path>${project.parent.basedir}</formatter-path>

        <!-- Disable the JavaDoc DocLint feature that comes with Java8 and checks
                the JavaDoc for errors and fail if some are found. -->
        <doclint>none</doclint>

        <!-- governikus dependencies -->
        <version.governikus-opensaml-extension>1.1.2</version.governikus-opensaml-extension>

        <!-- dependency versions -->
        <version.angus-activation>2.0.2</version.angus-activation>
        <version.bouncycastle>1.80</version.bouncycastle>
        <version.brave>6.0.3</version.brave>
        <version.brave-propagation-tracecontext>0.2.0</version.brave-propagation-tracecontext>
        <version.commons-codec>1.17.2</version.commons-codec>
        <version.cxf>4.1.0</version.cxf>
        <version.guava>33.4.0-jre</version.guava>
        <version.jakarta.activation-api>2.1.3</version.jakarta.activation-api>
        <version.jakarta.annotation-api>3.0.0</version.jakarta.annotation-api>
        <version.jakarta.jws-api>3.0.0</version.jakarta.jws-api>
        <version.jakarta.mail-api>2.1.3</version.jakarta.mail-api>
        <version.jakarta.xml.bind-api>4.0.2</version.jakarta.xml.bind-api>
        <version.jakarta.xml.soap-api>3.0.2</version.jakarta.xml.soap-api>
        <version.jakarta.xml.ws-api>4.0.2</version.jakarta.xml.ws-api>
        <version.jaxb-impl>4.0.5</version.jaxb-impl>
        <version.jaxb-runtime>4.0.5</version.jaxb-runtime>
        <version.jaxws-rt>4.0.3</version.jaxws-rt>
        <version.micrometer>1.4.2</version.micrometer>
        <version.opensaml>4.3.2</version.opensaml>
        <version.saaj-impl>3.0.4</version.saaj-impl>
        <version.xmlsec>3.0.5</version.xmlsec>

        <!-- logging -->
        <version.slf4j>2.0.16</version.slf4j>


        <!-- testing -->
        <version.junit-bom>5.11.4</version.junit-bom>
        <version.mockito-core>5.15.2</version.mockito-core>
        <version.spring-context>6.2.2</version.spring-context>

        <!-- plugin versions -->
        <version.build-helper-maven-plugin>3.6.0</version.build-helper-maven-plugin>
        <version.central-publishing-maven-plugin>0.7.0</version.central-publishing-maven-plugin>
        <version.dependency-check-maven>12.0.1</version.dependency-check-maven>
        <version.extra-enforcer-rules>1.9.0</version.extra-enforcer-rules>
        <version.jacoco-maven-plugin>0.8.12</version.jacoco-maven-plugin>
        <version.jaxb-maven-plugin>4.0.8</version.jaxb-maven-plugin>
        <version.jaxws-maven-plugin>4.0.3</version.jaxws-maven-plugin>
        <version.maven-compiler-plugin>3.13.0</version.maven-compiler-plugin>
        <version.maven-clean-plugin>3.4.0</version.maven-clean-plugin>
        <version.maven-deploy-plugin>3.1.3</version.maven-deploy-plugin>
        <version.maven-enforcer-plugin>3.5.0</version.maven-enforcer-plugin>
        <version.maven-formatter-plugin>2.24.1</version.maven-formatter-plugin>
        <version.maven-gpg-plugin>3.2.7</version.maven-gpg-plugin>
        <version.maven-install-plugin>3.1.3</version.maven-install-plugin>
        <version.maven-jar-plugin>3.4.2</version.maven-jar-plugin>
        <version.maven-javadoc-plugin>3.11.2</version.maven-javadoc-plugin>
        <version.maven-jxr-plugin>3.6.0</version.maven-jxr-plugin>
        <version.maven-release-plugin>3.1.1</version.maven-release-plugin>
        <version.maven-resources-plugin>3.3.1</version.maven-resources-plugin>
        <version.maven-site-plugin>3.21.0</version.maven-site-plugin>
        <version.maven-source-plugin>3.3.1</version.maven-source-plugin>
        <version.maven-surefire-plugin>3.5.2</version.maven-surefire-plugin>
        <version.sonar-jacoco-listeners>5.14.0.18788</version.sonar-jacoco-listeners>

        <!--Version Conflicts-->
        <version.cryptacular>1.2.7</version.cryptacular>
        <!--enforcer rules -->

        <!-- check minimum require java version -->
        <enforcer.minimum.requireJavaVersion>[${maven.compiler.target},)</enforcer.minimum.requireJavaVersion>
        <!-- Ban snapshot versions for plugins per default. You can temporarily
            enable them during development by overriding this property -->
        <enforcer.banPluginSnapshots>true</enforcer.banPluginSnapshots>
    </properties>

    <dependencyManagement>
        <dependencies>

            <!-- own modules -->
            <dependency>
                <groupId>de.governikus.panstar.sdk</groupId>
                <artifactId>panstar-saml-sdk</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>de.governikus.panstar.sdk</groupId>
                <artifactId>panstar-soap-sdk</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>de.governikus.panstar.sdk</groupId>
                <artifactId>panstar-utils</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>de.governikus.panstar.sdk</groupId>
                <artifactId>panstar-sdk-classpath-test</artifactId>
                <version>${project.version}</version>
            </dependency>

            <!-- governikus dependencies -->
            <dependency>
                <groupId>de.governikus.opensaml.extension</groupId>
                <artifactId>opensaml-governikus-extension</artifactId>
                <version>${version.governikus-opensaml-extension}</version>
            </dependency>

            <!-- open SAML -->
            <dependency>
                <groupId>org.opensaml</groupId>
                <artifactId>opensaml-core</artifactId>
                <version>${version.opensaml}</version>
            </dependency>

            <dependency>
                <groupId>org.opensaml</groupId>
                <artifactId>opensaml-messaging-impl</artifactId>
                <version>${version.opensaml}</version>
            </dependency>

            <dependency>
                <groupId>org.opensaml</groupId>
                <artifactId>opensaml-saml-api</artifactId>
                <version>${version.opensaml}</version>
            </dependency>

            <dependency>
                <groupId>org.opensaml</groupId>
                <artifactId>opensaml-saml-impl</artifactId>
                <version>${version.opensaml}</version>
            </dependency>

            <dependency>
                <groupId>org.opensaml</groupId>
                <artifactId>opensaml-security-api</artifactId>
                <version>${version.opensaml}</version>
            </dependency>

            <dependency>
                <groupId>org.opensaml</groupId>
                <artifactId>opensaml-security-impl</artifactId>
                <version>${version.opensaml}</version>
            </dependency>

            <dependency>
                <groupId>org.opensaml</groupId>
                <artifactId>opensaml-xmlsec-impl</artifactId>
                <version>${version.opensaml}</version>
            </dependency>

            <dependency>
                <groupId>org.opensaml</groupId>
                <artifactId>opensaml-xmlsec-api</artifactId>
                <version>${version.opensaml}</version>
            </dependency>

            <dependency>
                <groupId>org.opensaml</groupId>
                <artifactId>opensaml-xacml-impl</artifactId>
                <version>${version.opensaml}</version>
            </dependency>

            <dependency>
                <groupId>org.opensaml</groupId>
                <artifactId>opensaml-xacml-api</artifactId>
                <version>${version.opensaml}</version>
            </dependency>

            <dependency>
                <groupId>org.opensaml</groupId>
                <artifactId>opensaml-xacml-saml-impl</artifactId>
                <version>${version.opensaml}</version>
            </dependency>

            <dependency>
                <groupId>org.opensaml</groupId>
                <artifactId>opensaml-xacml-saml-api</artifactId>
                <version>${version.opensaml}</version>
            </dependency>

            <dependency>
                <groupId>org.opensaml</groupId>
                <artifactId>opensaml-messaging-api</artifactId>
                <version>${version.opensaml}</version>
            </dependency>


            <!-- cxf -->
            <dependency>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-rt-transports-http</artifactId>
                <version>${version.cxf}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-rt-ws-security</artifactId>
                <version>${version.cxf}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-rt-frontend-jaxws</artifactId>
                <version>${version.cxf}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-rt-transports-http-jetty</artifactId>
                <version>${version.cxf}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-integration-tracing-brave</artifactId>
                <version>${version.cxf}</version>
            </dependency>
            <dependency>
                <groupId>io.zipkin.brave</groupId>
                <artifactId>brave-bom</artifactId>
                <version>${version.brave}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
            <dependency>
                <groupId>io.zipkin.contrib.brave-propagation-w3c</groupId>
                <artifactId>brave-propagation-tracecontext</artifactId>
                <version>${version.brave-propagation-tracecontext}</version>
            </dependency>
            <dependency>
                <groupId>io.micrometer</groupId>
                <artifactId>micrometer-tracing-bridge-brave</artifactId>
                <version>${version.micrometer}</version>
            </dependency>

            <!-- Generell dependencies versions -->
            <dependency>
                <groupId>jakarta.mail</groupId>
                <artifactId>jakarta.mail-api</artifactId>
                <version>${version.jakarta.mail-api}</version>
            </dependency>

            <dependency>
                <groupId>org.eclipse.angus</groupId>
                <artifactId>angus-activation</artifactId>
                <version>${version.angus-activation}</version>
            </dependency>

            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcprov-jdk18on</artifactId>
                <version>${version.bouncycastle}</version>
            </dependency>

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

            <dependency>
                <groupId>commons-codec</groupId>
                <artifactId>commons-codec</artifactId>
                <version>${version.commons-codec}</version>
            </dependency>

            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${version.guava}</version>
            </dependency>

            <dependency>
                <groupId>jakarta.annotation</groupId>
                <artifactId>jakarta.annotation-api</artifactId>
                <version>${version.jakarta.annotation-api}</version>
            </dependency>

            <dependency>
                <groupId>jakarta.xml.soap</groupId>
                <artifactId>jakarta.xml.soap-api</artifactId>
                <version>${version.jakarta.xml.soap-api}</version>
            </dependency>

            <dependency>
                <groupId>jakarta.jws</groupId>
                <artifactId>jakarta.jws-api</artifactId>
                <version>${version.jakarta.jws-api}</version>
            </dependency>

            <dependency>
                <groupId>jakarta.xml.bind</groupId>
                <artifactId>jakarta.xml.bind-api</artifactId>
                <version>${version.jakarta.xml.bind-api}</version>
            </dependency>

            <dependency>
                <groupId>jakarta.xml.ws</groupId>
                <artifactId>jakarta.xml.ws-api</artifactId>
                <version>${version.jakarta.xml.ws-api}</version>
            </dependency>

            <dependency>
                <groupId>com.sun.xml.bind</groupId>
                <artifactId>jaxb-impl</artifactId>
                <version>${version.jaxb-impl}</version>
                <scope>runtime</scope>
            </dependency>

            <dependency>
                <groupId>com.sun.xml.ws</groupId>
                <artifactId>jaxws-rt</artifactId>
                <version>${version.jaxws-rt}</version>
            </dependency>

            <dependency>
                <groupId>com.sun.xml.messaging.saaj</groupId>
                <artifactId>saaj-impl</artifactId>
                <version>${version.saaj-impl}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.santuario</groupId>
                <artifactId>xmlsec</artifactId>
                <version>${version.xmlsec}</version>
            </dependency>

            <dependency>
                <groupId>jakarta.activation</groupId>
                <artifactId>jakarta.activation-api</artifactId>
                <version>${version.jakarta.activation-api}</version>
            </dependency>

            <dependency>
                <groupId>org.glassfish.jaxb</groupId>
                <artifactId>jaxb-runtime</artifactId>
                <version>${version.jaxb-runtime}</version>
            </dependency>

            <!-- logging -->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${version.slf4j}</version>
            </dependency>

            <!-- testing -->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-simple</artifactId>
                <version>${version.slf4j}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.junit</groupId>
                <artifactId>junit-bom</artifactId>
                <version>${version.junit-bom}</version>
                <type>pom</type>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${version.mockito-core}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-context</artifactId>
                <version>${version.spring-context}</version>
                <scope>test</scope>
            </dependency>

            <!-- Version Conflicts-->
            <dependency>
                <groupId>org.cryptacular</groupId>
                <artifactId>cryptacular</artifactId>
                <version>${version.cryptacular}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <!-- logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>

        <!-- testing -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>${version.junit-bom}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
        </dependency>
    </dependencies>


    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <!-- http://maven.apache.org/plugins/maven-deploy-plugin/ -->
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>${version.maven-deploy-plugin}</version>
                    <configuration>
                        <deployAtEnd>true</deployAtEnd>
                    </configuration>
                </plugin>
                <plugin>
                    <!-- http://maven.apache.org/maven-release/maven-release-plugin/ -->
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>${version.maven-release-plugin}</version>
                    <inherited>true</inherited>
                    <configuration>
                        <!-- per our convention, all submodules must have the same version
                            as the parent -->
                        <autoVersionSubmodules>true</autoVersionSubmodules>

                        <!-- prepareAndPerformRelease can be used as profile activation condition -->
                        <arguments>-DprepareAndPerformRelease</arguments>

                        <!-- for hg and git -->
                        <remoteTagging>false</remoteTagging>
                        <pushChanges>false</pushChanges> <!-- no auto push, better rollback -->
                        <localCheckout>true</localCheckout> <!-- for git and hg -->
                        <waitBeforeTagging>2</waitBeforeTagging> <!-- for review-board -->
                    </configuration>
                </plugin>
                <plugin>
                    <!-- http://maven.apache.org/plugins/maven-resources-plugin/ -->
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>${version.maven-resources-plugin}</version>
                </plugin>
                <plugin>
                    <!-- http://maven.apache.org/plugins/maven-compiler-plugin/ -->
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${version.maven-compiler-plugin}</version>
                </plugin>
                <plugin>
                    <!-- http://maven.apache.org/plugins/maven-jar-plugin/ -->
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${version.maven-jar-plugin}</version>
                </plugin>
                <plugin>
                    <!-- http://maven.apache.org/enforcer/maven-enforcer-plugin/ -->
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>${version.maven-enforcer-plugin}</version>
                    <dependencies>
                        <dependency>
                            <groupId>org.codehaus.mojo</groupId>
                            <artifactId>extra-enforcer-rules</artifactId>
                            <version>${version.extra-enforcer-rules}</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <!-- OWASP dependency-check http://jeremylong.github.io/DependencyCheck/index.html -->
                    <groupId>org.owasp</groupId>
                    <artifactId>dependency-check-maven</artifactId>
                    <version>${version.dependency-check-maven}</version>
                    <configuration>
                        <skipProvidedScope>true</skipProvidedScope>
                        <skipTestScope>true</skipTestScope>
                        <skipRuntimeScope>false</skipRuntimeScope>
                        <skipSystemScope>true</skipSystemScope>
                        <format>${dependency-check-format}</format>
                        <outputDirectory>${project.build.directory}</outputDirectory>
                        <failOnError>false</failOnError>
                    </configuration>
                </plugin>
                <plugin>
                    <!-- http://maven.apache.org/surefire/maven-surefire-plugin/ -->
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${version.maven-surefire-plugin}</version>
                    <inherited>true</inherited>
                    <configuration>
                        <runOrder>hourly</runOrder>
                        <!-- alphabetical on even hours, reverse alphabetical on odd hours -->
                        <forkMode>once</forkMode>
                        <forkCount>1</forkCount>
                        <!-- problem with reuse forks an jacoco : https://jira.sonarsource.com/browse/SONARJAVA-728 -->
                        <reuseForks>true</reuseForks>
                        <argLine>${argLineTestExec}</argLine>
                        <skip>false</skip>
                        <failIfNoTests>false</failIfNoTests>
                        <excludes>
                            <exclude>**/TestSuite*.*</exclude>
                            <exclude>**/*TestSuite.*</exclude>
                            <exclude>**/IT*.*</exclude>
                            <exclude>**/*IT.*</exclude>
                            <exclude>**/*IntegrationTest.*</exclude>
                            <exclude>**/*SystemTest.*</exclude>
                            <exclude>**/*PerformanceTest.*</exclude>
                        </excludes>
                    </configuration>
                </plugin>
                <plugin>
                    <!-- http://maven.apache.org/surefire/maven-surefire-report-plugin/ -->
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-report-plugin</artifactId>
                    <version>${version.maven-surefire-plugin}</version>
                </plugin>
                <plugin>
                    <!-- http://www.eclemma.org/jacoco/trunk/doc/maven.html -->
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>${version.jacoco-maven-plugin}</version>
                </plugin>

                <plugin>
                    <groupId>com.sun.xml.ws</groupId>
                    <artifactId>jaxws-maven-plugin</artifactId>
                    <version>${version.jaxws-maven-plugin}</version>
                </plugin>

                <plugin>
                    <groupId>org.jvnet.jaxb</groupId>
                    <artifactId>jaxb-maven-plugin</artifactId>
                    <version>${version.jaxb-maven-plugin}</version>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>${version.build-helper-maven-plugin}</version>
                </plugin>

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

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

                <plugin>
                    <!-- https://maven.apache.org/jxr/maven-jxr-plugin/ -->
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jxr-plugin</artifactId>
                    <version>${version.maven-jxr-plugin}</version>
                </plugin>

                <plugin>
                    <!-- https://maven.apache.org/plugins/maven-clean-plugin/ -->
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>${version.maven-clean-plugin}</version>
                </plugin>

                <plugin>
                    <!-- https://maven.apache.org/plugins/maven-install-plugin/ -->
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>${version.maven-install-plugin}</version>
                    <configuration>
                        <installAtEnd>true</installAtEnd>
                    </configuration>
                </plugin>

                <plugin>
                    <!-- http://maven.apache.org/plugins/maven-site-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-gpg-plugin</artifactId>
                    <version>${version.maven-gpg-plugin}</version>
                </plugin>

                <plugin>
                    <groupId>org.sonatype.central</groupId>
                    <artifactId>central-publishing-maven-plugin</artifactId>
                    <version>${version.central-publishing-maven-plugin}</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>enforce-general-project-rules</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireJavaVersion>
                                    <version>${enforcer.minimum.requireJavaVersion}</version>
                                </requireJavaVersion>

                                <requireMavenVersion>
                                    <version>[${maven.minimum.version},)</version>
                                </requireMavenVersion>

                                <requireProperty>
                                    <property>project.groupId</property>
                                    <regex>de\.governikus(\..+)?</regex>
                                    <regexMessage>The groupId must start with de.governikus.</regexMessage>
                                </requireProperty>

                                <dependencyConvergence />

                                <requirePluginVersions>
                                    <message>Best Practice is to always define plugin versions!</message>
                                    <banSnapshots>${enforcer.banPluginSnapshots}</banSnapshots>
                                </requirePluginVersions>

                                <requireReleaseDeps>
                                    <onlyWhenRelease>true</onlyWhenRelease>
                                    <message>No Snapshots Allowed!</message>
                                </requireReleaseDeps>

                                <reactorModuleConvergence>
                                    <message>The reactor is not valid</message>
                                </reactorModuleConvergence>

                                <banDistributionManagement>
                                    <allowSite>true</allowSite>
                                </banDistributionManagement>

                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>net.revelc.code.formatter</groupId>
                <artifactId>formatter-maven-plugin</artifactId>
                <version>${version.maven-formatter-plugin}</version>
                <configuration>
                    <configFile>${formatter-path}/GOV-formatting.xml</configFile>
                    <lineEnding>LF</lineEnding>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>validate</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <!-- from http://www.aheritier.net/maven-failsafe-sonar-and-jacoco-are-in-a-boat/ -->
        <profile>
            <id>coverage</id>
            <activation>
                <!-- activate automatically when built on Jenkins build server -->
                <property>
                    <name>env.CI</name>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.sonarsource.java</groupId>
                    <artifactId>sonar-jacoco-listeners</artifactId>
                    <version>${version.sonar-jacoco-listeners}</version>
                    <scope>test</scope>
                </dependency>
            </dependencies>

            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <inherited>true</inherited>
                        <configuration>
                            <reportsDirectory>${sonar.junit.reportPaths}</reportsDirectory>
                            <properties>
                                <property>
                                    <name>listener</name>
                                    <value>org.sonar.java.jacoco.JUnitListener</value>
                                </property>
                            </properties>
                            <argLine>${argLineTestExec} ${jacoco.agent.argLine}</argLine>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <configuration>
                            <excludes>
                                <!-- exclude javassist classes (leads to runtime exception in coverage) -->
                                <!-- see http://docs.sonarqube.org/display/PLUG/JaCoCo+Plugin for
                                    more information -->
                                <exclude>*_javassist_*</exclude>
                                <exclude>org.springframework.*</exclude>
                            </excludes>
                        </configuration>
                        <executions>
                            <!-- Unit tests -->
                            <execution>
                                <id>pre-unit-test</id>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                                <phase>initialize</phase>
                                <configuration>
                                    <!-- JaCoCo runtime agent for surefire-plugin -->
                                    <propertyName>jacoco.agent.argLine</propertyName>
                                    <append>true</append>
                                </configuration>
                            </execution>
                            <execution>
                                <id>post-unit-test</id>
                                <goals>
                                    <goal>report</goal>
                                </goals>
                                <phase>test</phase>
                                <configuration>
                                    <outputDirectory>${project.reporting.outputDirectory}/jacoco</outputDirectory>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>attachSourceAndJavaDoc</id>
            <activation>
                <!-- activate automatically when built on Jenkins build server -->
                <property>
                    <name>env.CI</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <!-- http://stackoverflow.com/questions/4251488/maven-release-plugin-fails-source-artifacts-getting-deployed-twice -->
                            <!-- This id must match the -Prelease-profile id value or else sources
								will be "uploaded" twice, which cause Nexus to fail -->
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <phase>none</phase>
                            </execution>
                            <execution>
                                <id>attach-sources-new</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <inherited>true</inherited>
                        <configuration>
                            <quiet>true</quiet>
                            <detectJavaApiLink>false</detectJavaApiLink>
                            <excludePackageNames>
                                de.bund.bsi.*,oasis.names.tc.*,org.w3.*,de.governikus.panstar.sdk.tctoken
                            </excludePackageNames>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jxr-plugin</artifactId>
                        <inherited>true</inherited>
                        <executions>
                            <execution>
                                <id>main-jxr-package</id>
                                <goals>
                                    <goal>jxr</goal>
                                </goals>
                                <phase>package</phase>
                                <configuration>
                                    <javadocDir>${project.build.directory}/apidocs</javadocDir>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>require-upper-bound-deps</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-enforcer-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>require-upper-bound-deps</id>
                                <goals>
                                    <goal>enforce</goal>
                                </goals>
                                <configuration>
                                    <rules>
                                        <requireUpperBoundDeps />
                                    </rules>
                                    <fail>true</fail>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>SignAndDeploy</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <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>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>central</publishingServerId>
                            <excludeArtifacts>
                                <excludeArtifact>panstar-sdk-classpath-test</excludeArtifact>
                            </excludeArtifacts>
                        </configuration>
                        <executions>
                            <execution>
                                <id>deploy-artifacts</id>
                                <phase>deploy</phase>
                                <goals>
                                    <goal>publish</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
