<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
         xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>no.ks.fiks.pom</groupId>
        <artifactId>fiks-ekstern-kotlin-superpom</artifactId>
        <version>1.0.21</version>
    </parent>

    <groupId>no.ks.fiks</groupId>
    <artifactId>maskinporten</artifactId>
    <version>3.0.0</version>
    <packaging>pom</packaging>
    <name>${project.artifactId}</name>
    <description>${project.artifactId}</description>
    <url>https://github.com/ks-no/fiks-maskinporten</url>

    <modules>
        <module>maskinporten-client</module>
        <module>maskinporten-spring-boot-client</module>
    </modules>

    <scm>
        <connection>scm:git:git@github.com:ks-no/fiks-maskinporten.git</connection>
        <developerConnection>scm:git:git@github.com:ks-no/fiks-maskinporten.git</developerConnection>
        <url>https://github.com/ks-no/fiks-maskinporten</url>
    </scm>

    <properties>
        <maven.compiler.target>17</maven.compiler.target>
        <maven.compiler.source>17</maven.compiler.source>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>

        <nimbus-jose-jwt.version>9.31</nimbus-jose-jwt.version>
        <virksomhetssertifikat.version>4.0.0</virksomhetssertifikat.version>
        <expiringmap.version>0.5.10</expiringmap.version>
        <mockserver.version>5.15.0</mockserver.version>
        <lang-tag.version>1.7</lang-tag.version>
        <oauth2-oidc-sdk.version>10.7</oauth2-oidc-sdk.version>
        <apache-httpclient.version>5.2.1</apache-httpclient.version>

        <junit.version>5.9.2</junit.version>
        <assertj.version>3.24.2</assertj.version>
        <mockk.version>1.13.4</mockk.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.nimbusds</groupId>
                <artifactId>lang-tag</artifactId>
                <version>${lang-tag.version}</version>
            </dependency>
            <dependency>
                <groupId>com.nimbusds</groupId>
                <artifactId>nimbus-jose-jwt</artifactId>
                <version>${nimbus-jose-jwt.version}</version>
            </dependency>
            <dependency>
                <groupId>com.nimbusds</groupId>
                <artifactId>oauth2-oidc-sdk</artifactId>
                <version>${oauth2-oidc-sdk.version}</version>
            </dependency>
            <dependency>
                <groupId>net.jodah</groupId>
                <artifactId>expiringmap</artifactId>
                <version>${expiringmap.version}</version>
            </dependency>
            <dependency>
                <groupId>no.ks.fiks</groupId>
                <artifactId>maskinporten-client</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.httpcomponents.client5</groupId>
                <artifactId>httpclient5</artifactId>
                <version>${apache-httpclient.version}</version>
            </dependency>
            <dependency>
                <groupId>org.junit</groupId>
                <artifactId>junit-bom</artifactId>
                <version>${junit.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.mock-server</groupId>
                <artifactId>mockserver-junit-jupiter</artifactId>
                <version>${mockserver.version}</version>
            </dependency>
            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>${assertj.version}</version>
            </dependency>
            <dependency>
                <groupId>no.ks.fiks</groupId>
                <artifactId>virksomhetssertifikat</artifactId>
                <version>${virksomhetssertifikat.version}</version>
            </dependency>
            <dependency>
                <groupId>io.github.microutils</groupId>
                <artifactId>kotlin-logging-jvm</artifactId>
                <version>${kotlin-logging.version}</version>
            </dependency>
            <dependency>
                <groupId>io.kotest</groupId>
                <artifactId>kotest-runner-junit5-jvm</artifactId>
                <version>${kotest.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>io.kotest</groupId>
                <artifactId>kotest-assertions-core-jvm</artifactId>
                <version>${kotest.version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.jetbrains.kotlin</groupId>
                    <artifactId>kotlin-maven-plugin</artifactId>
                    <version>${kotlin.version}</version>
                    <executions>
                        <execution>
                            <id>compile</id>
                            <phase>compile</phase>
                            <goals>
                                <goal>compile</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>test-compile</id>
                            <phase>test-compile</phase>
                            <goals>
                                <goal>test-compile</goal>
                            </goals>
                        </execution>
                    </executions>

                    <configuration>
                        <args>
                            <arg>-Xjsr305=strict</arg>
                            <arg>-java-parameters</arg>
                        </args>
                        <compilerPlugins>
                            <plugin>spring</plugin>
                        </compilerPlugins>
                        <jvmTarget>${maven.compiler.source}</jvmTarget>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>org.jetbrains.kotlin</groupId>
                            <artifactId>kotlin-maven-allopen</artifactId>
                            <version>${kotlin.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>

            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
            </plugin>
            <plugin>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.jetbrains.dokka</groupId>
                <artifactId>dokka-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
</project>
