<?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>
    <artifactId>parent</artifactId>
    <groupId>no.difi.move-common</groupId>
    <version>1.11.0</version>
    <packaging>pom</packaging>
    <name>Move-common</name>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.6.2</version>
        <relativePath />
    </parent>

    <scm>
        <connection>scm:git:https://github.com/felleslosninger/efm-common</connection>
        <developerConnection>scm:git:https://github.com/felleslosninger/efm-common</developerConnection>
        <url>https://github.com/felleslosninger/efm-common</url>
        <tag>HEAD</tag>
    </scm>

    <licenses>
        <license>
            <name>The Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Digdir</name>
            <email>servicedesk@digdir.no</email>
            <organization>Digdir</organization>
            <organizationUrl>https://www.digdir.no</organizationUrl>
        </developer>
    </developers>

    <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>

    <repositories>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>MavenArtifactFeed</id>
            <url>https://pkgs.dev.azure.com/dificloud/_packaging/MavenArtifactFeed/maven/v1</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>Jsch</id>
            <url>http://jsch.sf.net/maven2/</url>
        </repository>
    </repositories>

    <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <spring.cloud.version>2021.0.0</spring.cloud.version>
        <logback.version>1.2.3</logback.version>
        <mockito.version>2.28.2</mockito.version>
        <commons-lang.version>2.3</commons-lang.version>
        <xmlsec.version>2.1.5</xmlsec.version>
        <json-path.version>2.4.0</json-path.version>
        <activemq.version>5.15.9</activemq.version>
        <nimbus.jwt.version>9.15.2</nimbus.jwt.version>
        <springfox.version>2.9.2</springfox.version>
        <swagger.version>1.5.20</swagger.version>
        <guava.version>30.0-jre</guava.version>
        <xstream.version>1.4.18</xstream.version>
        <bouncycastle.version>1.67</bouncycastle.version>
        <commons-asic.version>0.9.3</commons-asic.version>
        <spring-security-oath.version>2.3.6.RELEASE</spring-security-oath.version>
    </properties>

    <modules>
        <module>audit</module>
        <module>cloud</module>
        <module>config</module>
        <module>security</module>
        <module>webservice-tools</module>
        <module>annotation</module>
        <module>domain</module>
        <module>validation</module>
        <module>io</module>
        <module>certvalidator</module>
        <module>properties</module>
        <module>persistence</module>
        <module>spring-converter</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>no.difi.move-common</groupId>
                <artifactId>audit</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>no.difi.move-common</groupId>
                <artifactId>cloud</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>no.difi.move-common</groupId>
                <artifactId>config</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>no.difi.move-common</groupId>
                <artifactId>security</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>no.difi.move-common</groupId>
                <artifactId>webservice-tools</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>no.difi.move-common</groupId>
                <artifactId>annotation</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>no.difi.move-common</groupId>
                <artifactId>domain</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>no.difi.move-common</groupId>
                <artifactId>validation</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>no.difi.commons</groupId>
                <artifactId>commons-certvalidator</artifactId>
                <version>2.1.1</version>
            </dependency>

            <dependency>
                <groupId>net.logstash.logback</groupId>
                <artifactId>logstash-logback-encoder</artifactId>
                <version>4.9</version>
            </dependency>
            <dependency>
                <groupId>org.springframework.retry</groupId>
                <artifactId>spring-retry</artifactId>
                <version>1.3.0</version>
            </dependency>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>2.8.0</version>
            </dependency>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${guava.version}</version>
            </dependency>
            <dependency>
                <groupId>io.springfox</groupId>
                <artifactId>springfox-swagger2</artifactId>
                <version>${springfox.version}</version>
            </dependency>
            <dependency>
                <groupId>io.springfox</groupId>
                <artifactId>springfox-swagger-ui</artifactId>
                <version>${springfox.version}</version>
            </dependency>
            <dependency>
                <groupId>io.springfox</groupId>
                <artifactId>springfox-bean-validators</artifactId>
                <version>${springfox.version}</version>
            </dependency>
            <dependency>
                <groupId>io.swagger</groupId>
                <artifactId>swagger-annotations</artifactId>
                <version>${swagger.version}</version>
            </dependency>
            <dependency>
                <groupId>io.swagger</groupId>
                <artifactId>swagger-models</artifactId>
                <version>${swagger.version}</version>
            </dependency>
            <dependency>
                <groupId>com.nimbusds</groupId>
                <artifactId>nimbus-jose-jwt</artifactId>
                <version>${nimbus.jwt.version}</version>
            </dependency>

            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>${spring.cloud.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.santuario</groupId>
                <artifactId>xmlsec</artifactId>
                <version>${xmlsec.version}</version>
            </dependency>
            <!-- See https://better-coding.com/solved-org-w3c-dom-domexception-wrong_document_err/ -->
            <dependency>
                <groupId>org.apache.wss4j</groupId>
                <artifactId>wss4j-ws-security-dom</artifactId>
                <version>2.2.3</version>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${mockito.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>commons-lang</groupId>
                <artifactId>commons-lang</artifactId>
                <version>${commons-lang.version}</version>
            </dependency>
            <dependency>
                <groupId>com.thoughtworks.xstream</groupId>
                <artifactId>xstream</artifactId>
                <version>${xstream.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcprov-jdk15on</artifactId>
                <version>${bouncycastle.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcpkix-jdk15on</artifactId>
                <version>${bouncycastle.version}</version>
            </dependency>
            <dependency>
                <groupId>no.difi.commons</groupId>
                <artifactId>commons-asic</artifactId>
                <version>${commons-asic.version}</version>
                <type>jar</type>
            </dependency>
            <dependency>
                <groupId>org.springframework.security.oauth</groupId>
                <artifactId>spring-security-oauth2</artifactId>
                <version>${spring-security-oath.version}</version>
                <type>jar</type>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.owasp</groupId>
                <artifactId>dependency-check-maven</artifactId>
                <version>1.4.3</version>
                <configuration>
                    <format>XML</format>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>
                <configuration>
                    <tagNameFormat>v@{project.version}</tagNameFormat>
                    <releaseProfiles>release</releaseProfiles>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.scm</groupId>
                        <artifactId>maven-scm-provider-gitexe</artifactId>
                        <version>1.9.5</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.2.1</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>3.3.0</version>
                <executions>
                    <execution>
                        <id>attach-javadoc</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>ossrh</id>
            <properties>
                <dokka.skip>false</dokka.skip>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</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>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
