<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>no.digipost</groupId>
        <artifactId>digipost-open-super-pom</artifactId>
        <version>7</version>
    </parent>

    <artifactId>certificate-validator</artifactId>
    <version>2.3</version>
    <name>Digipost Certificate Validator</name>
    <description>Library for validating certificates.</description>

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

    <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <project.previousVersion>set_with_-Dproject.previousVersion=X.Y</project.previousVersion>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.junit</groupId>
                <artifactId>junit-bom</artifactId>
                <version>5.8.0-RC1</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>jakarta.servlet</groupId>
            <artifactId>jakarta.servlet-api</artifactId>
            <version>4.0.4</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcpkix-jdk15on</artifactId>
            <version>1.69</version>
        </dependency>
        <dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcprov-jdk15on</artifactId>
            <version>1.69</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.5.13</version>
            <exclusions>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpcore</artifactId>
            <version>4.4.14</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.32</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <version>1.7.32</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>1.7.32</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>no.digipost</groupId>
            <artifactId>digg</artifactId>
            <version>0.30</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>30.1.1-jre</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.quicktheories</groupId>
            <artifactId>quicktheories</artifactId>
            <version>0.26</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest</artifactId>
            <version>2.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>uk.co.probablyfine</groupId>
            <artifactId>java-8-matchers</artifactId>
            <version>1.9</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.hamcrest</groupId>
                    <artifactId>hamcrest-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>3.12.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-junit-jupiter</artifactId>
            <version>3.12.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>nl.jqno.equalsverifier</groupId>
            <artifactId>equalsverifier</artifactId>
            <version>3.7.1</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5.3</version>
                </plugin>
                <plugin>
                    <groupId>com.mycila</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>4.1</version>
                    <configuration>
                        <header>src/main/license-header.txt</header>
                        <strictCheck>true</strictCheck>
                        <excludes>
                            <exclude>LICENSE*</exclude>
                            <exclude>NOTICE</exclude>
                            <exclude>**/*.xml</exclude>
                            <exclude>.github/**/*.yml</exclude>
                            <exclude>**/*.pem</exclude>
                            <exclude>**/*.cer</exclude>
                            <exclude>**/*.response</exclude>
                            <exclude>.editorconfig</exclude>
                            <exclude>.drone.yml</exclude>
                            <exclude>.mvn/maven.config</exclude>
                        </excludes>
                    </configuration>
                    <executions>
                        <execution>
                            <id>check-license-header</id>
                            <goals>
                                <goal>check</goal>
                            </goals>
                            <phase>test</phase>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>3.0.0</version>
                    <configuration>
                        <rules>
                            <requireMavenVersion>
                                <!-- Maven 3.3.1 is needed for .mvn/maven.config to work
                                     https://maven.apache.org/docs/3.3.1/release-notes.html -->
                                <version>3.3.1</version>
                            </requireMavenVersion>
                            <bannedDependencies>
                                <excludes>
                                    <exclude>*:*</exclude>
                                    <exclude>org.hamcrest:hamcrest-core</exclude>
                                    <exclude>org.hamcrest:hamcrest-library</exclude>
                                </excludes>
                                <includes>
                                    <include>org.slf4j:slf4j-api</include>
                                    <include>org.slf4j:jcl-over-slf4j</include>
                                    <include>org.slf4j:slf4j-simple</include>
                                    <include>org.apache.commons:commons-lang3</include>
                                    <include>org.bouncycastle:bcprov-jdk15on</include>
                                    <include>org.bouncycastle:bcpkix-jdk15on</include>
                                    <include>org.bouncycastle:bcutil-jdk15on</include>
                                    <include>commons-codec:commons-codec</include>
                                    <include>org.apache.httpcomponents:httpcore</include>
                                    <include>org.apache.httpcomponents:httpclient</include>
                                    <include>jakarta.servlet:jakarta.servlet-api</include>

                                    <!-- Test dependencies are automatically allowed -->
                                    <include>*:*:*:*:test</include>
                                </includes>
                                <searchTransitive>true</searchTransitive>
                                <message>
                                    Detected unknown dependencies! Verify that all licenses are OK, and run mvn notice:generate to update the NOTICE file.
                                </message>
                            </bannedDependencies>
                        </rules>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.1</version>
                </plugin>
                <plugin>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>3.0.0-M5</version>
                </plugin>
                <plugin>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>3.0.0-M1</version>
                </plugin>
                <plugin>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>
                <plugin>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>3.1.2</version>
                </plugin>
                <plugin>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>3.0.0-M1</version>
                </plugin>
                <plugin>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.2.0</version>
                </plugin>
                <plugin>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.2.0</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>2.8.1</version>
                </plugin>
                <plugin>
                    <groupId>com.github.siom79.japicmp</groupId>
                    <artifactId>japicmp-maven-plugin</artifactId>
                    <version>0.15.3</version>
                    <configuration>
                        <oldVersion>
                            <dependency>
                                <groupId>${project.groupId}</groupId>
                                <artifactId>${project.artifactId}</artifactId>
                                <version>${project.previousVersion}</version>
                            </dependency>
                        </oldVersion>
                        <newVersion>
                            <file><path>${project.build.directory}/${project.build.finalName}.${project.packaging}</path></file>
                        </newVersion>
                        <parameter>
                            <onlyModified>true</onlyModified>
                            <onlyBinaryIncompatible>true</onlyBinaryIncompatible>
                            <includes>
                                <include>no.digipost.security</include>
                            </includes>
                        </parameter>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>check-license-header</id>
                        <phase>test</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>analyze-only</goal>
                        </goals>
                        <configuration>
                            <failOnWarning>true</failOnWarning>
                            <ignoreNonCompile>true</ignoreNonCompile>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <scm>
        <connection>scm:git:git@github.com:digipost/certificate-validator.git</connection>
        <developerConnection>scm:git:git@github.com:digipost/certificate-validator.git</developerConnection>
        <url>https://github.com/digipost/certificate-validator/</url>
        <tag>HEAD</tag>
    </scm>

</project>
