<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>
  <groupId>com.nordstrom.tools</groupId>
  <artifactId>junit-foundation</artifactId>
  <version>18.0.0</version>
  <packaging>jar</packaging>
  
  <name>JUnit Foundation</name>
  <description>This is the foundation framework for JUnit automation</description>
  <url>https://github.com/sbabcoc/JUnit-Foundation</url>
  
  <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>Scott Babcock</name>
      <email>scoba@hotmail.com</email>
      <organization>Nordstrom</organization>
      <organizationUrl>https://shop.nordstrom.com</organizationUrl>
    </developer>
  </developers>
  
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.release>8</maven.compiler.release>
    <java-utils.version>4.0.0</java-utils.version>
    <settings.version>4.0.0</settings.version>
    <junit.version>4.13.2</junit.version>
    <!-- TestNG 7.6+ requires Java 11; 7.5.1 is the last Java 8 compatible release -->
    <testng.version>7.5.1</testng.version>
    <bytebuddy.version>1.17.8</bytebuddy.version>
    <!-- logback 1.3.x is the last Java 8-compatible series; 1.5.x requires JDK 11+ -->
    <logback.version>1.3.16</logback.version>
    <!-- JUnitParams is effectively unmaintained; 1.1.1 is the final release -->
    <junitparams.version>1.1.1</junitparams.version>
    <!-- PowerMock is effectively unmaintained; 2.0.9 is the final release -->
    <powermock.version>2.0.9</powermock.version>
    <paraminjector.version>1.20</paraminjector.version>
    <compiler-plugin.version>3.14.0</compiler-plugin.version>
    <surefire-plugin.version>3.5.4</surefire-plugin.version>
    <source-plugin.version>3.3.1</source-plugin.version>
    <javadoc-plugin.version>3.12.0</javadoc-plugin.version>
    <gpg-plugin.version>3.2.8</gpg-plugin.version>
    <staging-plugin.version>1.7.0</staging-plugin.version>
    <release-plugin.version>3.3.1</release-plugin.version>
    <jar-plugin.version>3.4.2</jar-plugin.version>
    <skipSigning>true</skipSigning>
  </properties>
  
  <scm>
    <connection>scm:git:https://github.com/sbabcoc/JUnit-Foundation.git</connection>
    <developerConnection>scm:git:https://github.com/sbabcoc/JUnit-Foundation.git</developerConnection>
    <url>https://github.com/sbabcoc/JUnit-Foundation/tree/master</url>
    <tag>junit-foundation-18.0.0</tag>
  </scm>

  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://ossrh-staging-api.central.sonatype.com/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>ossrh</id>
      <url>https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>

  <dependencies>
    <dependency>
      <groupId>com.nordstrom.tools</groupId>
      <artifactId>java-utils</artifactId>
      <version>${java-utils.version}</version>
    </dependency>
    <dependency>
      <groupId>com.nordstrom.tools</groupId>
      <artifactId>settings</artifactId>
      <version>${settings.version}</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit.version}</version>
      <!-- NOTE: 'compile' scope is required -->
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.testng</groupId>
      <artifactId>testng</artifactId>
      <version>${testng.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>net.bytebuddy</groupId>
      <artifactId>byte-buddy</artifactId>
      <version>${bytebuddy.version}</version>
    </dependency>
    <dependency>
      <groupId>net.bytebuddy</groupId>
      <artifactId>byte-buddy-agent</artifactId>
      <version>${bytebuddy.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>${logback.version}</version>
    </dependency>
    <dependency>
      <groupId>pl.pragmatists</groupId>
      <artifactId>JUnitParams</artifactId>
      <version>${junitparams.version}</version>
    </dependency>
    <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-module-junit4</artifactId>
      <version>${powermock.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-api-mockito2</artifactId>
      <version>${powermock.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.google.testparameterinjector</groupId>
      <artifactId>test-parameter-injector</artifactId>
      <version>${paraminjector.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${compiler-plugin.version}</version>
        <configuration>
          <compilerArgs>
            <arg>-parameters</arg>
          </compilerArgs>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${surefire-plugin.version}</version>
        <configuration>
          <argLine>
            -javaagent:src/test/resources/test-agent.jar
            --add-opens java.base/java.lang=ALL-UNNAMED
          </argLine>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <version>${source-plugin.version}</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${javadoc-plugin.version}</version>
        <configuration>
          <detectJavaApiLink>false</detectJavaApiLink>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>${gpg-plugin.version}</version>
        <executions>
          <execution>
            <id>sign-artifacts</id>
            <phase>verify</phase>
            <goals>
              <goal>sign</goal>
            </goals>
            <configuration>
              <skip>${skipSigning}</skip>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>${staging-plugin.version}</version>
        <extensions>true</extensions>
        <dependencies>
          <dependency>
            <groupId>io.github.x-stream</groupId>
            <artifactId>mxparser</artifactId>
            <version>1.2.1</version>
          </dependency>
        </dependencies>
        <configuration>
          <serverId>ossrh</serverId>
          <nexusUrl>https://ossrh-staging-api.central.sonatype.com/</nexusUrl>
          <autoReleaseAfterClose>true</autoReleaseAfterClose>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-release-plugin</artifactId>
        <version>${release-plugin.version}</version>
        <configuration>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <useReleaseProfile>false</useReleaseProfile>
          <releaseProfiles>release</releaseProfiles>
          <goals>deploy</goals>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <version>${jar-plugin.version}</version>
        <configuration>
          <archive>
            <manifestEntries>
              <Premain-Class>com.nordstrom.automation.junit.JUnitAgent</Premain-Class>
              <Can-Redefine-Classes>false</Can-Redefine-Classes>
              <Can-Retransform-Classes>true</Can-Retransform-Classes>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>
    </plugins>
  </build>
  
  <profiles>
    <profile>
      <id>signing</id>
      <properties>
        <skipSigning>false</skipSigning>
      </properties>
    </profile>
  </profiles>
</project>
