<?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright 2020 Rob Spoor

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->

<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>com.github.robtimus</groupId>
    <artifactId>robtimus-parent</artifactId>
    <version>1.12</version>
    <relativePath />
  </parent>

  <artifactId>junit-support</artifactId>
  <version>3.0</version>
  <packaging>jar</packaging>

  <name>junit-support</name>
  <description>Contains interfaces and classes that make it easier to write tests with JUnit</description>
  <url>https://robtimus.github.io/junit-support/</url>
  <inceptionYear>2020</inceptionYear>

  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Rob Spoor</name>
      <email>robtimus@users.noreply.github.com</email>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git@github.com:robtimus/junit-support.git</connection>
    <developerConnection>scm:git:git@github.com:robtimus/junit-support.git</developerConnection>
    <tag>3.0</tag>
    <url>https://github.com/robtimus/junit-support</url>
  </scm>

  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/robtimus/junit-support/issues</url>
  </issueManagement>

  <properties>
    <version.java>11</version.java>

    <version.commons-io>2.16.1</version.commons-io>
    <version.io-functions>2.0</version.io-functions>
    <version.junit-testkit>1.10.2</version.junit-testkit>
    <version.log4j>2.23.1</version.log4j>
    <version.logback>1.5.6</version.logback>
    <version.pioneer>2.2.0</version.pioneer>
    <version.reload4j>1.2.25</version.reload4j>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
    </dependency>

    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest</artifactId>
    </dependency>

    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
    </dependency>

    <dependency>
      <groupId>com.github.robtimus</groupId>
      <artifactId>io-functions</artifactId>
      <version>${version.io-functions}</version>
    </dependency>

    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-core</artifactId>
      <version>${version.log4j}</version>
      <optional>true</optional>
    </dependency>

    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>${version.logback}</version>
      <optional>true</optional>
    </dependency>

    <dependency>
      <groupId>ch.qos.reload4j</groupId>
      <artifactId>reload4j</artifactId>
      <version>${version.reload4j}</version>
      <optional>true</optional>
    </dependency>

    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>${version.commons-io}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.junit.platform</groupId>
      <artifactId>junit-platform-testkit</artifactId>
      <version>${version.junit-testkit}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.junit-pioneer</groupId>
      <artifactId>junit-pioneer</artifactId>
      <version>${version.pioneer}</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>org.junit.platform</groupId>
          <artifactId>junit-platform-commons</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <configuration>
            <links>
              <link>https://commons.apache.org/proper/commons-io/javadocs/api-release/</link>
              <link>https://junit.org/junit5/docs/current/api/</link>
              <link>https://ota4j-team.github.io/opentest4j/docs/current/api/</link>
              <link>https://logging.apache.org/log4j/2.x/log4j-api/apidocs/</link>
              <link>https://logging.apache.org/log4j/2.x/log4j-core/apidocs/</link>
              <link>https://logback.qos.ch/apidocs/</link>
              <link>https://reload4j.qos.ch/apidocs/</link>
              <link>https://www.slf4j.org/apidocs/</link>
            </links>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>com.github.robtimus</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <descriptors>
            <descriptor>src/main/assembly/src.xml</descriptor>
            <descriptor>src/main/assembly/bin.xml</descriptor>
          </descriptors>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-clean-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <!-- Allow JUnit to access the test classes -->
          <argLine>
            @{argLine}
            --add-modules org.apache.logging.log4j
            --add-modules ch.qos.logback.classic
            --add-modules ch.qos.logback.core

            --add-opens com.github.robtimus.junit.support/com.github.robtimus.junit.support.extension.util=java.logging
            --add-opens com.github.robtimus.junit.support/com.github.robtimus.junit.support.extension.util=org.apache.logging.log4j.core
            --add-opens com.github.robtimus.junit.support/com.github.robtimus.junit.support.extension.util=ch.qos.logback.core
            --add-opens com.github.robtimus.junit.support/com.github.robtimus.junit.support.extension.util=ch.qos.reload4j

            --add-opens com.github.robtimus.junit.support/com.github.robtimus.junit.support=org.junit.platform.commons
            --add-opens com.github.robtimus.junit.support/com.github.robtimus.junit.support.concurrent=org.junit.platform.commons
            --add-opens com.github.robtimus.junit.support/com.github.robtimus.junit.support.extension=org.junit.platform.commons
            --add-opens com.github.robtimus.junit.support/com.github.robtimus.junit.support.extension.logging=org.junit.platform.commons
            --add-opens com.github.robtimus.junit.support/com.github.robtimus.junit.support.extension.testlogger=org.junit.platform.commons
            --add-opens com.github.robtimus.junit.support/com.github.robtimus.junit.support.extension.testresource=org.junit.platform.commons
            --add-opens com.github.robtimus.junit.support/com.github.robtimus.junit.support.params=org.junit.platform.commons
            --add-opens com.github.robtimus.junit.support/com.github.robtimus.junit.support.test=org.junit.platform.commons
            --add-opens com.github.robtimus.junit.support/com.github.robtimus.junit.support.test.collections=org.junit.platform.commons
            --add-opens com.github.robtimus.junit.support/com.github.robtimus.junit.support.test.io=org.junit.platform.commons

            --add-opens com.github.robtimus.junit.support/com.github.robtimus.junit.support.examples.collections=org.junit.platform.commons
            --add-opens com.github.robtimus.junit.support/com.github.robtimus.junit.support.examples.covariantreturn=org.junit.platform.commons
            --add-opens com.github.robtimus.junit.support/com.github.robtimus.junit.support.examples.delegation=org.junit.platform.commons
            --add-opens com.github.robtimus.junit.support/com.github.robtimus.junit.support.examples.io=org.junit.platform.commons

            --add-opens org.junit.platform.commons/org.junit.platform.commons.logging=ALL-UNNAMED
            --add-opens org.junit.platform.commons/org.junit.platform.commons.util=ALL-UNNAMED
          </argLine>
          <systemPropertyVariables>
            <java.util.logging.config.class>com.github.robtimus.junit.support.extension.util.JdkLoggerConfigurer</java.util.logging.config.class>
          </systemPropertyVariables>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-install-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-gpg-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-deploy-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>min-versions</id>
      <properties>
        <version.junit>5.9.0</version.junit>
        <version.junit-testkit>1.9.0</version.junit-testkit>
        <version.logback>1.3.14</version.logback>
        <version.pioneer>1.9.1</version.pioneer>
        <version.reload4j>1.2.25</version.reload4j>
      </properties>
    </profile>
  </profiles>
</project>
