<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.github.ansell</groupId>
	<artifactId>parentpom</artifactId>
	<version>13</version>
	<name>Maven Parent POM</name>
	<description>Maven Parent POM</description>
	<packaging>pom</packaging>

	<url>https://github.com/ansell/ansell-parentpom</url>

	<licenses>
		<license>
			<name>MIT</name>
			<url>https://github.com/ansell/ansell-parentpom/blob/master/LICENSE</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<scm>
		<url>git@github.com:ansell/ansell-parentpom.git</url>
		<connection>scm:git:git@github.com:ansell/ansell-parentpom.git</connection>
		<developerConnection>scm:git:git@github.com:ansell/ansell-parentpom.git</developerConnection>
	</scm>

	<developers>
		<developer>
			<id>ansell</id>
			<name>Peter Ansell</name>
			<email>p_ansell@yahoo.com</email>
			<url>https://github.com/ansell</url>
			<timezone>UTC+10</timezone>
		</developer>
	</developers>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

		<minimumMavenVersion>3.2.2</minimumMavenVersion>

		<jdkLevel>1.8</jdkLevel>
		<animal-sniffer-signature.artifact>java18</animal-sniffer-signature.artifact>
		<animal-sniffer-signature.version>1.0</animal-sniffer-signature.version>

		<!-- JUnit-5 versions, to keep them consistent with one another and use 
			them for surefire configuration -->
		<junit.version>4.12</junit.version>
		<junit.jupiter.version>5.5.1</junit.jupiter.version>
		<junit.vintage.version>5.5.1</junit.vintage.version>
		<junit.platform.version>1.3.1</junit.platform.version>
	</properties>

	<dependencyManagement>
		<dependencies>
			<!-- Manage JUnit versions to keep them consistent with JUnit Platform/Jupiter -->
			<dependency>
				<groupId>org.junit.jupiter</groupId>
				<artifactId>junit-jupiter-api</artifactId>
				<version>${junit.jupiter.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>${junit.version}</version>
			</dependency>
			<!-- Only required to run tests in an IDE that bundles an older version -->
			<dependency>
				<groupId>org.junit.platform</groupId>
				<artifactId>junit-platform-launcher</artifactId>
				<version>${junit.platform.version}</version>
				<scope>test</scope>
			</dependency>
			<!-- Only required to run tests in an IDE that bundles an older version -->
			<dependency>
				<groupId>org.junit.jupiter</groupId>
				<artifactId>junit-jupiter-engine</artifactId>
				<version>${junit.jupiter.version}</version>
				<scope>test</scope>
			</dependency>
			<!-- Only required to run tests in an IDE that bundles an older version -->
			<dependency>
				<groupId>org.junit.vintage</groupId>
				<artifactId>junit-vintage-engine</artifactId>
				<version>${junit.vintage.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.junit.jupiter</groupId>
				<artifactId>junit-jupiter-migrationsupport</artifactId>
				<version>${junit.jupiter.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.junit.jupiter</groupId>
				<artifactId>junit-jupiter-params</artifactId>
				<version>${junit.jupiter.version}</version>
				<scope>test</scope>
			</dependency>
			<!-- To avoid compiler warnings about @API annotations in JUnit code -->
			<dependency>
				<groupId>org.apiguardian</groupId>
				<artifactId>apiguardian-api</artifactId>
				<version>1.0.0</version>
				<scope>test</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.8.1</version>
					<configuration>
						<source>${jdkLevel}</source>
						<target>${jdkLevel}</target>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-dependency-plugin</artifactId>
					<version>3.1.1</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>3.1.1</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-deploy-plugin</artifactId>
					<version>3.0.0-M1</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-resources-plugin</artifactId>
					<version>3.1.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-plugin-plugin</artifactId>
					<version>3.6.0</version>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-install-plugin</artifactId>
					<version>3.0.0-M1</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-clean-plugin</artifactId>
					<version>3.1.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-gpg-plugin</artifactId>
					<version>1.6</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>3.1.2</version>
					<executions>
						<execution>
							<goals>
								<goal>test-jar</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>3.1.0</version>
				</plugin>
				<plugin>
					<groupId>org.jacoco</groupId>
					<artifactId>jacoco-maven-plugin</artifactId>
					<version>0.8.4</version>
					<executions>
						<execution>
							<id>prepare-agent</id>
							<goals>
								<goal>prepare-agent</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>3.0.0-M3</version>
					<configuration>
						<runOrder>random</runOrder>
						<trimStackTrace>false</trimStackTrace>
					</configuration>
					<dependencies>
						<dependency>
							<groupId>org.junit.platform</groupId>
							<artifactId>junit-platform-surefire-provider</artifactId>
							<version>${junit.platform.version}</version>
						</dependency>
						<!-- JUnit-5 Jupiter engine to run migrated tests -->
						<dependency>
							<groupId>org.junit.jupiter</groupId>
							<artifactId>junit-jupiter-engine</artifactId>
							<version>${junit.jupiter.version}</version>
						</dependency>
						<!-- Also keep the JUnit-4 engine to run unmigrated tests -->
						<dependency>
							<groupId>org.junit.vintage</groupId>
							<artifactId>junit-vintage-engine</artifactId>
							<version>${junit.vintage.version}</version>
						</dependency>
					</dependencies>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-failsafe-plugin</artifactId>
					<version>3.0.0-M3</version>
					<configuration>
						<runOrder>random</runOrder>
						<trimStackTrace>false</trimStackTrace>
						<includes>
							<include>**/Test*.java</include>
							<include>**/*Test.java</include>
							<include>**/*Tests.java</include>
							<include>**/*TestCase.java</include>
						</includes>
					</configuration>
					<dependencies>
						<dependency>
							<groupId>org.junit.platform</groupId>
							<artifactId>junit-platform-surefire-provider</artifactId>
							<version>${junit.platform.version}</version>
						</dependency>
						<!-- JUnit-5 Jupiter engine to run migrated tests -->
						<dependency>
							<groupId>org.junit.jupiter</groupId>
							<artifactId>junit-jupiter-engine</artifactId>
							<version>${junit.jupiter.version}</version>
						</dependency>
						<!-- Also keep the JUnit-4 engine to run unmigrated tests -->
						<dependency>
							<groupId>org.junit.vintage</groupId>
							<artifactId>junit-vintage-engine</artifactId>
							<version>${junit.vintage.version}</version>
						</dependency>
					</dependencies>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>animal-sniffer-maven-plugin</artifactId>
					<version>1.18</version>
					<executions>
						<execution>
							<id>enforce-jdk-api</id>
							<phase>test</phase>
							<goals>
								<goal>check</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<signature>
							<groupId>org.codehaus.mojo.signature</groupId>
							<artifactId>${animal-sniffer-signature.artifact}</artifactId>
							<version>${animal-sniffer-signature.version}</version>
						</signature>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-enforcer-plugin</artifactId>
					<version>3.0.0-M1</version>
					<executions>
						<execution>
							<id>enforce-maven-versioning</id>
							<goals>
								<goal>enforce</goal>
							</goals>
							<configuration>
								<rules>
									<requireMavenVersion>
										<version>[${minimumMavenVersion},)</version>
									</requireMavenVersion>
									<requireJavaVersion>
										<version>[${jdkLevel},)</version>
									</requireJavaVersion>
								</rules>
							</configuration>
						</execution>
						<execution>
							<id>enforce-bytecode-version</id>
							<goals>
								<goal>enforce</goal>
							</goals>
							<configuration>
								<rules>
									<enforceBytecodeVersion>
										<maxJdkVersion>${jdkLevel}</maxJdkVersion>
										<ignoreClasses>
											<!-- ignore multirelease JAR classes -->
											<ignoreClass>META-INF/versions/**/*</ignoreClass>
											<!-- ignore JAVA 9 module-info files, for eg org.ow2.asm:asm:6.0+ -->
											<ignoreClass>module-info</ignoreClass>
										</ignoreClasses>
									</enforceBytecodeVersion>
								</rules>
								<fail>true</fail>
							</configuration>
						</execution>
					</executions>
					<dependencies>
						<dependency>
							<groupId>org.codehaus.mojo</groupId>
							<artifactId>extra-enforcer-rules</artifactId>
							<version>1.0-beta-9</version>
						</dependency>
					</dependencies>
				</plugin>
				<plugin>
					<groupId>org.moditect</groupId>
					<artifactId>moditect-maven-plugin</artifactId>
					<version>1.0.0.Beta2</version>
					<executions>
						<execution>
							<id>add-module-infos</id>
							<phase>package</phase>
							<goals>
								<goal>add-module-info</goal>
							</goals>
							<configuration>
								<overwriteExistingFiles>true</overwriteExistingFiles>
								<module>
									<moduleInfoFile>src/moditect/module-info.java</moduleInfoFile>
								</module>
							</configuration>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jdeps-plugin</artifactId>
					<version>3.1.2</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-shade-plugin</artifactId>
					<version>3.2.1</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-antrun-plugin</artifactId>
					<version>1.8</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-assembly-plugin</artifactId>
					<version>3.1.1</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-war-plugin</artifactId>
					<version>3.2.3</version>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>appassembler-maven-plugin</artifactId>
					<version>2.1.0</version>
				</plugin>
				<plugin>
					<groupId>org.eluder.coveralls</groupId>
					<artifactId>coveralls-maven-plugin</artifactId>
					<version>4.3.0</version>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>versions-maven-plugin</artifactId>
					<version>2.7</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-release-plugin</artifactId>
					<version>2.5.3</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-site-plugin</artifactId>
					<version>3.8.2</version>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>license-maven-plugin</artifactId>
					<version>2.0.0</version>
					<executions>
						<execution>
							<id>download-licenses</id>
							<goals>
								<goal>download-licenses</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<!--This plugin's configuration is used to store Eclipse m2e settings 
					only. It has no influence on the Maven build itself. -->
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>
											org.apache.maven.plugins
										</groupId>
										<artifactId>
											maven-plugin-plugin
										</artifactId>
										<versionRange>
											[0,)
										</versionRange>
										<goals>
											<goal>helpmojo</goal>
											<goal>descriptor</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-enforcer-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jdeps-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>animal-sniffer-maven-plugin</artifactId>
			</plugin>
		</plugins>
	</build>

	<repositories>
		<repository>
			<id>sonatype-nexus-snapshots</id>
			<name>Sonatype Nexus Snapshots</name>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</repository>
	</repositories>

	<pluginRepositories>
		<pluginRepository>
			<id>sonatype-nexus-snapshots</id>
			<name>Sonatype Nexus Snapshots</name>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</pluginRepository>
	</pluginRepositories>

	<distributionManagement>
		<snapshotRepository>
			<id>sonatype-nexus-snapshots</id>
			<name>Sonatype Nexus Snapshots</name>
			<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
		</snapshotRepository>
		<repository>
			<id>sonatype-nexus-staging</id>
			<name>Nexus Release Repository</name>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>

	<profiles>
		<profile>
			<id>sonatype-oss-release</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-enforcer-plugin</artifactId>
						<version>3.0.0-M1</version>
						<executions>
							<execution>
								<id>enforce-no-snapshots</id>
								<goals>
									<goal>enforce</goal>
								</goals>
								<configuration>
									<rules>
										<requirePluginVersions>
											<message>Best Practice is to always define plugin versions!</message>
											<banLatest>true</banLatest>
											<banRelease>true</banRelease>
											<banSnapshots>true</banSnapshots>
										</requirePluginVersions>
										<requireReleaseDeps>
											<message>No Snapshot dependencies allowed!</message>
											<onlyWhenRelease>true</onlyWhenRelease>
										</requireReleaseDeps>
									</rules>
								</configuration>
							</execution>
							<execution>
								<id>enforce-bytecode-version</id>
								<goals>
									<goal>enforce</goal>
								</goals>
								<configuration>
									<rules>
										<enforceBytecodeVersion>
											<maxJdkVersion>${jdkLevel}</maxJdkVersion>
											<ignoreClasses>
												<!-- ignore JEP238 Multi-Release JAR classes -->
												<ignoreClass>META-INF/versions/**/*</ignoreClass>
												<!-- ignore JAVA 9 module-info files, for eg org.ow2.asm:asm:6.0+ -->
												<ignoreClass>module-info</ignoreClass>
											</ignoreClasses>
										</enforceBytecodeVersion>
									</rules>
									<fail>true</fail>
								</configuration>
							</execution>
						</executions>
						<dependencies>
							<dependency>
								<groupId>org.codehaus.mojo</groupId>
								<artifactId>extra-enforcer-rules</artifactId>
								<version>1.2</version>
							</dependency>
						</dependencies>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<goal>jar-no-fork</goal>
								</goals>
							</execution>
							<execution>
								<id>attach-test-sources</id>
								<goals>
									<goal>test-jar-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>

