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

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

    <groupId>no.difi.move-common</groupId>
    <artifactId>parent</artifactId>
    <version>2.0.2</version>
    <packaging>pom</packaging>
    <name>Move-common</name>

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

    <properties>
        <java.version>21</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <commons-asic.version>1.0.0</commons-asic.version>
    </properties>

    <modules>
        <module>audit</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>
    </modules>

    <dependencyManagement>
        <dependencies>

            <!-- moduler fra dette prosjektet -->

            <dependency>
                <groupId>no.difi.move-common</groupId>
                <artifactId>annotation</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>no.difi.move-common</groupId>
                <artifactId>audit</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>domain</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>no.difi.move-common</groupId>
                <artifactId>validation</artifactId>
                <version>${project.version}</version>
            </dependency>

            <!-- andre digdir fellesmoduler -->

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

            <dependency>
                <groupId>no.difi.commons</groupId>
                <artifactId>commons-asic</artifactId>
                <version>${commons-asic.version}</version>
            </dependency>

            <!-- resterende avhengigheter -->

            <dependency>
                <groupId>net.logstash.logback</groupId>
                <artifactId>logstash-logback-encoder</artifactId>
                <version>8.0</version>
            </dependency>
            <dependency>
                <groupId>org.springframework.retry</groupId>
                <artifactId>spring-retry</artifactId>
                <version>2.0.11</version>
            </dependency>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>2.18.0</version>
            </dependency>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>33.4.0-jre</version>
            </dependency>
            <dependency>
                <groupId>com.nimbusds</groupId>
                <artifactId>nimbus-jose-jwt</artifactId>
                <version>10.0.1</version>
            </dependency>
            <dependency>
                <groupId>org.apache.santuario</groupId>
                <artifactId>xmlsec</artifactId>
                <version>3.0.5</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>3.0.4</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>3.17.0</version>
            </dependency>
            <dependency>
                <groupId>com.thoughtworks.xstream</groupId>
                <artifactId>xstream</artifactId>
                <version>1.4.21</version>
            </dependency>
            <dependency>
                <groupId>org.yaml</groupId>
                <artifactId>snakeyaml</artifactId>
                <version>2.3</version>
            </dependency>

            <!-- test avhengigheter -->

            <dependency>
                <groupId>org.wiremock</groupId>
                <artifactId>wiremock-standalone</artifactId>
                <version>3.10.0</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>5.15.2</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.13.0</version>
                <configuration>
                    <release>${java.version}</release>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.owasp</groupId>
                <artifactId>dependency-check-maven</artifactId>
                <version>12.0.2</version>
                <configuration>
                    <format>HTML</format>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>3.1.1</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <tagNameFormat>@{project.version}</tagNameFormat>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.3.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.11.2</version>
                <executions>
                    <execution>
                        <id>attach-javadoc</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <doclint>none</doclint>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <repositories>
        <repository>
            <id>central</id>
            <name>Central Repository</name>
            <url>https://repo.maven.apache.org/maven2</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>github</id>
            <url>https://maven.pkg.github.com/felleslosninger/efm-common</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

    <distributionManagement>
        <repository>
            <id>github</id>
            <name>GitHub felleslosninger Apache Maven Packages</name>
            <url>https://maven.pkg.github.com/felleslosninger/efm-common</url>
        </repository>
        <snapshotRepository>
            <id>github</id>
            <url>https://maven.pkg.github.com/felleslosninger/efm-common</url>
        </snapshotRepository>
    </distributionManagement>

    <scm>
        <developerConnection>scm:git:git@github.com:felleslosninger/efm-common</developerConnection>
        <tag>2.0.2</tag>
    </scm>

    <profiles>
        <profile>
            <id>ossrh</id>
            <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>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                </repository>
                <repository>
                    <id>Jsch</id>
                    <url>http://jsch.sf.net/maven2/</url>
                </repository>
            </repositories>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.2.7</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>
