<?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-web</artifactId>
	<version>1.13.0</version>

	<name>recheck - web</name>
	<description>recheck for web apps.</description>
	<url>https://retest.de/recheck-web/</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>
		<maven.surefire.and.failsafe.version>3.0.0-M5</maven.surefire.and.failsafe.version>
		<mockito.version>4.3.1</mockito.version>
		<logback.version>1.2.11</logback.version>
		<selenium.version>4.1.2</selenium.version>
	</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>de.retest</groupId>
			<artifactId>recheck</artifactId>
			<version>1.13.0</version>
		</dependency>

		<!-- transitively loaded via Selenium -->
		<!-- see https://github.com/mockito/mockito/issues/1606 -->
		<dependency>
			<groupId>net.bytebuddy</groupId>
			<artifactId>byte-buddy</artifactId>
			<version>1.12.8</version>
		</dependency>

		<dependency>
			<groupId>org.seleniumhq.selenium</groupId>
			<artifactId>selenium-java</artifactId>
			<version>${selenium.version}</version>
		</dependency>

		<dependency>
			<groupId>com.assertthat</groupId>
			<artifactId>selenium-shutterbug</artifactId>
			<version>1.5</version>
		</dependency>

		<dependency>
			<groupId>org.yaml</groupId>
			<artifactId>snakeyaml</artifactId>
			<version>1.30</version>
		</dependency>

		<!-- test dependencies -->

		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter</artifactId>
			<version>5.8.2</version>
			<scope>test</scope>
		</dependency>

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

		<dependency>
			<groupId>de.retest</groupId>
			<artifactId>recheck-junit-jupiter-extension</artifactId>
			<version>1.12.0</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>de.retest</groupId>
			<artifactId>recheck-junit-4-extension</artifactId>
			<version>1.12.0</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-core</artifactId>
			<version>${logback.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
			<version>${logback.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>io.github.netmikey.logunit</groupId>
			<artifactId>logunit-core</artifactId>
			<version>1.1.3</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>io.github.netmikey.logunit</groupId>
			<artifactId>logunit-logback</artifactId>
			<version>1.1.3</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<version>${mockito.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-junit-jupiter</artifactId>
			<version>${mockito.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>com.approvaltests</groupId>
			<artifactId>approvaltests</artifactId>
			<version>14.0.0</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>${maven.surefire.and.failsafe.version}</version>
				<configuration>
					<includes>
						<!-- overwrite default, prevent run of files matching `Test*.class` -->
						<include>%regex[.*Test.class]</include>
					</includes>
					<properties>
						<configurationParameters>
							junit.jupiter.execution.parallel.enabled=true
						</configurationParameters>
					</properties>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-failsafe-plugin</artifactId>
				<version>${maven.surefire.and.failsafe.version}</version>
				<configuration>
					<!-- combine Surefire and Failsafe reports for SonarCloud -->
					<!-- see https://stackoverflow.com/a/15567782 -->
					<reportsDirectory>${project.build.directory}/surefire-reports/</reportsDirectory>
				</configuration>
				<executions>
					<execution>
						<id>run-integration-tests</id>
						<goals>
							<goal>integration-test</goal>
							<goal>verify</goal>
						</goals>
					</execution>
				</executions>
			</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.web</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-shade-plugin</artifactId>
				<version>3.2.4</version>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>shade</goal>
						</goals>
						<configuration>
							<createDependencyReducedPom>false</createDependencyReducedPom>
							<minimizeJar>true</minimizeJar>
							<shadedArtifactAttached>true</shadedArtifactAttached>
							<shadedClassifierName>jar-with-dependencies</shadedClassifierName>
							<transformers>
								<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
									<manifestEntries>
										<Implementation-Vendor-Id>${project.groupId}</Implementation-Vendor-Id>
										<Implementation-Title>${project.artifactId}</Implementation-Title>
										<Implementation-Version>${project.version}</Implementation-Version>
									</manifestEntries>
								</transformer>
							</transformers>
						</configuration>
					</execution>
				</executions>
			</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>
