<?xml version="1.0"?>
<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>

	<groupId>de.retest</groupId>
	<artifactId>recheck-testng-extension</artifactId>
	<version>1.13.0</version>

	<name>recheck-testng-extension</name>
	<description>TestNG extension reducing boilerplate code in tests.</description>
	<url>https://retest.de/recheck/</url>

	<organization>
		<name>retest @ UBS Hainer GmbH</name>
		<url>https://retest.de/</url>
	</organization>

	<developers>
		<developer>
			<id>team</id>
			<name>The retest developers</name>
			<email>info@retest.de</email>
			<url>https://github.com/orgs/retest/people</url>
		</developer>
	</developers>

	<contributors>
		<contributor>
			<name>The contributors</name>
			<url>https://github.com/retest/${project.artifactId}/graphs/contributors</url>
		</contributor>
	</contributors>

	<licenses>
		<license>
			<name>GNU Affero General Public License (AGPL), Version 3</name>
			<url>https://gnu.org/licenses/agpl-3.0.html</url>
		</license>
	</licenses>

	<properties>
		<java.version>1.8</java.version>
		<git.repo.host>github.com</git.repo.host>
		<git.repo.path>retest/${project.artifactId}</git.repo.path>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.resources.sourceEncoding>UTF-8</project.resources.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
	</properties>

	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
		</snapshotRepository>
		<repository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>

	<repositories>
		<repository>
			<id>central</id>
			<url>https://repo.maven.apache.org/maven2/</url>
		</repository>
		<repository>
			<id>jitpack.io</id>
			<url>https://jitpack.io/</url>
		</repository>
	</repositories>

	<dependencies>
		<dependency>
			<groupId>org.testng</groupId>
			<artifactId>testng</artifactId>
			<version>7.5</version>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>de.retest</groupId>
			<artifactId>recheck</artifactId>
			<version>1.13.0</version>
			<scope>compile</scope>
		</dependency>

		<!-- test dependencies -->

		<dependency>
			<groupId>org.assertj</groupId>
			<artifactId>assertj-core</artifactId>
			<version>3.22.0</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<version>4.3.1</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.10.0</version>
				<configuration>
					<source>${java.version}</source>
					<target>${java.version}</target>
					<compilerArgument>-Xlint:all</compilerArgument>
				</configuration>
			</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.2.2</version>
				<configuration>
					<archive>
						<manifest>
							<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
							<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
						</manifest>
						<manifestEntries>
							<Automatic-Module-Name>de.retest.recheck.testng</Automatic-Module-Name>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>

			<plugin>
				<groupId>com.amashchenko.maven.plugin</groupId>
				<artifactId>gitflow-maven-plugin</artifactId>
				<version>1.18.0</version>
				<configuration>
					<gitFlowConfig>
						<productionBranch>main</productionBranch>
						<releaseBranchPrefix>release/v</releaseBranchPrefix>
						<hotfixBranchPrefix>hotfix/v</hotfixBranchPrefix>
						<versionTagPrefix>v</versionTagPrefix>
					</gitFlowConfig>
					<commitDevelopmentVersionAtStart>true</commitDevelopmentVersionAtStart>
					<skipTestProject>true</skipTestProject>
					<useSnapshotInHotfix>true</useSnapshotInHotfix>
					<useSnapshotInRelease>true</useSnapshotInRelease>
					<versionDigitToIncrement>1</versionDigitToIncrement>
					<commitMessagePrefix xml:space="preserve">ci: </commitMessagePrefix>
					<pushRemote>true</pushRemote>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>3.2.1</version>
				<executions>
					<execution>
						<id>bundle-sources</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>3.3.2</version>
				<executions>
					<execution>
						<id>bundle-javadoc</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<!-- downgrade to fix Maven build with Java 13 -->
					<!-- see https://bugs.openjdk.java.net/browse/JDK-8212233 -->
					<source>8</source>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-enforcer-plugin</artifactId>
				<version>3.0.0</version>
				<executions>
					<execution>
						<id>enforce-maven</id>
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
							<rules>
								<requireMavenVersion>
									<version>3.4</version>
								</requireMavenVersion>
							</rules>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<version>1.6.12</version>
				<extensions>true</extensions>
				<configuration>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
					<serverId>ossrh</serverId>
					<stagingProfileId>506dfd640832af</stagingProfileId>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>sign</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>3.0.1</version>
						<configuration>
							<skip>${gpg.skip}</skip>
							<passphrase>${env.GPG_PASSPHRASE}</passphrase>
							<gpgArguments>
								<!-- This is necessary for gpg to not try to use the pinentry programs -->
								<arg>--pinentry-mode</arg>
								<arg>loopback</arg>
							</gpgArguments>
						</configuration>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>coverage</id>
			<build>
				<plugins>
					<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>
							<execution>
								<id>report</id>
								<goals>
									<goal>report</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<scm>
		<connection>scm:git:https://${git.repo.host}/${git.repo.path}.git</connection>
		<developerConnection>scm:git:ssh://git@${git.repo.host}/${git.repo.path}.git</developerConnection>
		<url>https://${git.repo.host}/${git.repo.path}/</url>
		<tag>HEAD</tag>
	</scm>
</project>
