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

  <packaging>pom</packaging>
  <groupId>dev.failsafe</groupId>
  <artifactId>failsafe-parent</artifactId>
  <version>3.3.2</version>
  <name>Failsafe Parent</name>
  <description>Fault tolerance and resilience patterns</description>
  <url>https://failsafe.dev</url>

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

  <developers>
    <developer>
      <name>Jonathan Halterman</name>
      <url>http://jodah.net</url>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git@github.com:failsafe-lib/failsafe.git</connection>
    <developerConnection>scm:git:git@github.com:failsafe-lib/failsafe.git</developerConnection>
    <url>https://github.com/failsafe-lib/failsafe</url>
    <tag>failsafe-parent-3.3.2</tag>
  </scm>

  <properties>
    <java.module.name>undefined</java.module.name>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
  </properties>

  <modules>
    <module>core</module>
    <module>modules/okhttp</module>
    <module>modules/retrofit</module>
  </modules>

  <dependencies>
    <!-- Test Dependencies -->
    <dependency>
      <groupId>org.testng</groupId>
      <artifactId>testng</artifactId>
      <version>6.9.10</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>4.2.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>net.jodah</groupId>
      <artifactId>concurrentunit</artifactId>
      <version>0.4.4</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.10.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.22.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.1.1</version>
        </plugin>
        <plugin>
          <groupId>org.moditect</groupId>
          <artifactId>moditect-maven-plugin</artifactId>
          <version>1.0.0.RC2</version>
          <executions>
            <execution>
              <id>add-module-infos</id>
              <phase>package</phase>
              <goals>
                <goal>add-module-info</goal>
              </goals>
              <configuration>
                <jvmVersion>9</jvmVersion>
                <overwriteExistingFiles>true</overwriteExistingFiles>
                <module>
                  <moduleInfo>
                    <name>${java.module.name}</name>
                    <!-- export everything -->
                    <exports>*;</exports>
                    <!-- declare services consumed by the artifact -->
                    <addServiceUses>true</addServiceUses>
                  </moduleInfo>
                </module>
                <jdepsExtraArgs>
                  <arg>--multi-release=9</arg>
                </jdepsExtraArgs>
              </configuration>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <trimStackTrace>false</trimStackTrace>
          <properties>
            <property>
              <name>listener</name>
              <value>dev.failsafe.testing.TestCaseLogger</value>
            </property>
          </properties>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-release-plugin</artifactId>
        <configuration>
          <releaseProfiles>release</releaseProfiles>
          <arguments>-Prelease</arguments>
          <mavenExecutorId>forked-path</mavenExecutorId>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>5.1.3</version>
        <extensions>true</extensions>
        <executions>
          <execution>
            <id>bundle-manifest</id>
            <phase>process-classes</phase>
            <goals>
              <goal>manifest</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <supportedProjectTypes>
            <supportedProjectType>jar</supportedProjectType>
            <supportedProjectType>bundle</supportedProjectType>
          </supportedProjectTypes>
          <instructions>
            <Implementation-Title>${project.description}</Implementation-Title>
            <Implementation-Version>${project.version}</Implementation-Version>
            <Bundle-Name>Failsafe</Bundle-Name>
            <Bundle-SymbolicName>dev.failsafe</Bundle-SymbolicName>
            <Automatic-Module-Name>dev.failsafe</Automatic-Module-Name>
            <Export-Package>dev.failsafe*;version=1.0</Export-Package>
            <Import-Package>*</Import-Package>
          </instructions>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.10.4</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <author>false</author>
          <show>protected</show>
          <excludePackageNames>*.internal</excludePackageNames>
          <detectOfflineLinks />
          <additionalparam>
            -Xdoclint:none
            -notimestamp
            -link http://docs.oracle.com/javase/8/docs/api/
            -link https://failsafe.dev/javadoc/core/
          </additionalparam>
        </configuration>
      </plugin>

      <!-- Coverage -->
      <plugin>
        <groupId>org.eluder.coveralls</groupId>
        <artifactId>coveralls-maven-plugin</artifactId>
        <version>3.1.0</version>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>0.8.7</version>
        <executions>
          <execution>
            <id>prepare-agent</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>2.1.2</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.1</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.6.7</version>
            <extensions>true</extensions>
            <configuration>
              <serverId>sonatype-nexus-staging</serverId>
              <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>true</autoReleaseAfterClose>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-release-plugin</artifactId>
            <configuration>
              <goals>deploy nexus-staging:release</goals>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
