<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2015-2017 Direktoratet for forvaltning og IKT
  ~
  ~ This source code is subject to dual licensing:
  ~
  ~
  ~ Licensed under the EUPL, Version 1.1 or – as soon they
  ~ will be approved by the European Commission - subsequent
  ~ versions of the EUPL (the "Licence");
  ~
  ~ This Source Code Form is subject to the terms of the Mozilla Public
  ~ License, v. 2.0. If a copy of the MPL was not distributed with this
  ~ file, You can obtain one at http://mozilla.org/MPL/2.0/.
  ~
  ~
  ~ See the Licence for the specific language governing
  ~ permissions and limitations under the Licence.
  -->

<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>network.oxalis.vefa</groupId>
    <artifactId>peppol-parent</artifactId>
    <packaging>pom</packaging>
    <version>2.1.0</version>

    <name>VEFA PEPPOL :: Parent</name>
    <description>Library for features to support use of PEPPOL infrastructure.</description>
    <url>https://github.com/OxalisCommunity/vefa-peppol</url>

    <modules>
        <module>peppol-common</module>
        <module>peppol-evidence</module>
        <module>peppol-icd</module>
        <module>peppol-lookup</module>
        <module>peppol-mode</module>
        <module>peppol-publisher</module>
        <module>peppol-sbdh</module>
        <module>peppol-security</module>
    </modules>

    <scm>
        <tag>v2.1.0</tag>
        <url>https://github.com/OxalisCommunity/vefa-peppol</url>
        <connection>scm:git:https://github.com/OxalisCommunity/vefa-peppol.git</connection>
        <developerConnection>scm:git:git@github.com:OxalisCommunity/vefa-peppol.git</developerConnection>
    </scm>

    <issueManagement>
        <url>https://github.com/OxalisCommunity/vefa-peppol/issues</url>
        <system>GitHub Issues</system>
    </issueManagement>

    <organization>
        <name>NorStella</name>
        <url>https://en.norstella.no/</url>
    </organization>

    <developers>
        <developer>
            <name>Arun Kumar</name>
            <email>arun.kaundal@gmail.com</email>
            <organization>Norstella</organization>
            <roles>
                <role>Oxalis Technical Expert</role>
            </roles>
        </developer>
        <developer>
            <name>Erlend Klakegg Bergheim</name>
            <email>erlend.klakegg.bergheim@difi.no</email>
            <organization>Difi</organization>
            <roles>
                <role>Principal author</role>
            </roles>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>European Union Public Licence (EUPL v.1.1)</name>
            <url>https://joinup.ec.europa.eu/community/eupl/og_page/european-union-public-licence-eupl-v11</url>
            <distribution>repo</distribution>
        </license>
        <license>
            <name>Mozilla Public License Version 2.0</name>
            <url>https://www.mozilla.org/en-US/MPL/2.0/</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <properties>
        <java.encoding>UTF-8</java.encoding>
        <java.version>1.8</java.version>
        <slf4j.version>1.7.30</slf4j.version>
    </properties>

    <dependencies>
        <!-- Testing -->
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>6.14.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>2.28.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>${slf4j.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.12</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.kohsuke.metainf-services</groupId>
            <artifactId>metainf-services</artifactId>
            <version>1.8</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <!-- VEFA PEPPOL -->
            <dependency>
                <groupId>network.oxalis.vefa</groupId>
                <artifactId>peppol-common</artifactId>
                <version>2.1.0</version>
            </dependency>
            <dependency>
                <groupId>network.oxalis.vefa</groupId>
                <artifactId>peppol-lookup</artifactId>
                <version>2.1.0</version>
            </dependency>
            <dependency>
                <groupId>network.oxalis.vefa</groupId>
                <artifactId>peppol-mode</artifactId>
                <version>2.1.0</version>
            </dependency>
            <dependency>
                <groupId>network.oxalis.vefa</groupId>
                <artifactId>peppol-security</artifactId>
                <version>2.1.0</version>
            </dependency>

            <!-- Difi Commons -->
            <dependency>
                <groupId>no.difi.commons</groupId>
                <artifactId>commons-certvalidator</artifactId>
                <version>2.2.1</version>
            </dependency>
            <dependency>
                <groupId>no.difi.commons</groupId>
                <artifactId>commons-bdx</artifactId>
                <version>0.9.5</version>
            </dependency>
            <dependency>
                <groupId>no.difi.commons</groupId>
                <artifactId>commons-busdox</artifactId>
                <version>0.9.5</version>
            </dependency>
            <dependency>
                <groupId>no.difi.commons</groupId>
                <artifactId>commons-sbdh</artifactId>
                <version>0.9.5</version>
            </dependency>

            <!-- Apache Http Components -->
            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpclient</artifactId>
                <version>4.5.13</version>
            </dependency>

            <!-- DNS -->
            <dependency>
                <groupId>dnsjava</groupId>
                <artifactId>dnsjava</artifactId>
                <version>2.1.9</version>
            </dependency>

            <!-- Google Guava -->
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>30.0-jre</version>
            </dependency>

            <!-- Typesafe Config -->
            <dependency>
                <groupId>com.typesafe</groupId>
                <artifactId>config</artifactId>
                <version>1.4.0</version>
            </dependency>

            <!-- Java -->
            <dependency>
                <groupId>javax.mail</groupId>
                <artifactId>mail</artifactId>
                <version>1.4.7</version>
            </dependency>
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>javax.servlet-api</artifactId>
                <version>3.1.0</version>
            </dependency>

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

            <!-- Apache Commons -->
            <dependency>
                <groupId>commons-codec</groupId>
                <artifactId>commons-codec</artifactId>
                <version>1.14</version>
            </dependency>

            <dependency>
                <groupId>com.github.tomakehurst</groupId>
                <artifactId>wiremock</artifactId>
                <version>2.27.2</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.2</version>
                <configuration>
                    <encoding>${java.encoding}</encoding>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.7</version>
                <configuration>
                    <encoding>${java.encoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>properties-maven-plugin</artifactId>
                <version>1.0.0</version>
                <executions>
                    <execution>
                        <id>set-additional-system-properties</id>
                        <goals>
                            <goal>set-system-properties</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <properties>
                        <property>
                            <name>javax.xml.accessExternalSchema</name>
                            <value>all</value>
                        </property>
                    </properties>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.1</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <excludes>
                        <exclude>network/oxalis/vefa/peppol/**/jaxb/**</exclude>
                    </excludes>
                </configuration>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5.3</version>
                    <dependencies>
                        <dependency>
                            <groupId>org.apache.maven.scm</groupId>
                            <artifactId>maven-scm-provider-gitexe</artifactId>
                            <version>1.9.4</version>
                        </dependency>
                    </dependencies>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>release-sign-artifacts</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.4</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.2.0</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <encoding>${java.encoding}</encoding>
                            <additionalOptions>
                                <additionalOption>-Xdoclint:none</additionalOption>
                            </additionalOptions>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <configuration>
                            <!-- Prevent gpg from using pinentry programs -->
                            <gpgArguments>
                                <arg>--pinentry-mode</arg>
                                <arg>loopback</arg>
                            </gpgArguments>
                        </configuration>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

</project>
