<?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>
	<parent>
		<groupId>com.github.tadukoo.maven</groupId>
		<artifactId>TadukooMavenParent</artifactId>
		<version>0.4-Alpha</version>
	</parent>
	<artifactId>TadukooMavenBasePOM</artifactId>
	<packaging>pom</packaging>
	<modules>
		<module>TadukooMavenJUnitPOM</module>
	</modules>
	<properties>
		<!-- Directories -->
		<directory.source>src</directory.source>
		<directory.test>junit</directory.test>
		<directory.resource>resource</directory.resource>
		<directory.test-resource>junit-resource</directory.test-resource>
		<directory.eclipse.annotationprocessing>.apt_generated</directory.eclipse.annotationprocessing>
		
		<!-- Java and JUnit Versions -->
		<java.version>17</java.version>
		<junit.jupiter.version>5.8.1</junit.jupiter.version>
		<junit.platform.version>1.8.1</junit.platform.version>
		
		<!-- Maven Plugin Versions -->
		<maven.compiler.version>3.8.1</maven.compiler.version>
		<maven.javadoc.version>3.3.1</maven.javadoc.version>
		<maven.source.version>3.2.1</maven.source.version>
		<!-- Note: 3.0.0-M5 has an issue where it doesn't run JUnit tests, hence using M4 -->
		<maven.surefire.version>3.0.0-M4</maven.surefire.version>
		<maven.jar.version>3.3.0</maven.jar.version>
		
		<!-- Other Plugin Versions -->
		<jacoco.version>0.8.7</jacoco.version>
		<nexus-staging.version>1.6.8</nexus-staging.version>
		
		<!-- JUnit Info -->
		<junit.jupiter.groupID>org.junit.jupiter</junit.jupiter.groupID>
		<junit.jupiter.artifactID>junit-jupiter-engine</junit.jupiter.artifactID>
		<junit.platform.groupID>org.junit.platform</junit.platform.groupID>
		<junit.platform.artifactID>junit-platform-runner</junit.platform.artifactID>
		
		<!-- Maven Info -->
		<maven.compiler.artifactID>maven-compiler-plugin</maven.compiler.artifactID>
		<maven.javadoc.artifactID>maven-javadoc-plugin</maven.javadoc.artifactID>
		<maven.source.artifactID>maven-source-plugin</maven.source.artifactID>
		<maven.surefire.artifactID>maven-surefire-plugin</maven.surefire.artifactID>
		<maven.jar.artifactID>maven-jar-plugin</maven.jar.artifactID>
		
		<!-- Other Plugin Info -->
		<jacoco.groupID>org.jacoco</jacoco.groupID>
		<jacoco.artifactID>jacoco-maven-plugin</jacoco.artifactID>
		<nexus-staging.groupID>org.sonatype.plugins</nexus-staging.groupID>
		<nexus-staging.artifactID>nexus-staging-maven-plugin</nexus-staging.artifactID>
	</properties>
	<dependencyManagement>
		<dependencies>
			<!-- JUnit Dependencies -->
			<dependency>
				<groupId>${junit.jupiter.groupID}</groupId>
				<artifactId>${junit.jupiter.artifactID}</artifactId>
				<version>${junit.jupiter.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>${junit.platform.groupID}</groupId>
				<artifactId>${junit.platform.artifactID}</artifactId>
				<version>${junit.platform.version}</version>
				<scope>test</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>
	<build>
		<pluginManagement>
			<plugins>
				<!-- Maven Plugins -->
				<!-- Maven Compiler Plugin -->
				<plugin>
					<artifactId>${maven.compiler.artifactID}</artifactId>
					<version>${maven.compiler.version}</version>
					<configuration>
						<release>${java.version}</release>
					</configuration>
				</plugin>
				<!-- Maven Javadoc Plugin -->
				<plugin>
					<artifactId>${maven.javadoc.artifactID}</artifactId>
					<version>${maven.javadoc.version}</version>
					<configuration>
						<release>${java.version}</release>
					</configuration>
					<executions>
						<execution>
							<id>attach-javadocs</id>
							<goals>
								<goal>jar</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<!-- Maven Source Plugin -->
				<plugin>
					<artifactId>${maven.source.artifactID}</artifactId>
					<version>${maven.source.version}</version>
					<executions>
						<execution>
							<id>attach-sources</id>
							<goals>
								<goal>jar-no-fork</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<!-- Maven Surefire Plugin -->
				<plugin>
					<artifactId>${maven.surefire.artifactID}</artifactId>
					<version>${maven.surefire.version}</version>
				</plugin>
				<!-- Maven Jar Plugin -->
				<plugin>
					<artifactId>${maven.jar.artifactID}</artifactId>
					<version>${maven.jar.version}</version>
					<executions>
						<execution>
							<goals>
								<goal>test-jar</goal>
							</goals>
							<configuration>
								<skipIfEmpty>true</skipIfEmpty>
							</configuration>
						</execution>
					</executions>
				</plugin>
				
				<!-- Other Plugins -->
				<!-- JaCoCo -->
				<plugin>
					<groupId>${jacoco.groupID}</groupId>
					<artifactId>${jacoco.artifactID}</artifactId>
					<version>${jacoco.version}</version>
					<executions>
						<execution>
							<goals>
								<goal>prepare-agent</goal>
							</goals>
						</execution>
						<execution>
							<id>report</id>
							<phase>test</phase>
							<goals>
								<goal>report</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<!-- Nexus Staging -->
				<plugin>
					<groupId>${nexus-staging.groupID}</groupId>
					<artifactId>${nexus-staging.artifactID}</artifactId>
					<version>${nexus-staging.version}</version>
					<extensions>true</extensions>
					<configuration>
						<serverId>ossrh</serverId>
						<nexusUrl>https://oss.sonatype.org</nexusUrl>
						<autoReleaseAfterClose>true</autoReleaseAfterClose>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<!-- Maven Plugins -->
			<plugin>
				<artifactId>${maven.source.artifactID}</artifactId>
				<inherited>true</inherited>
			</plugin>
			<plugin>
				<artifactId>${maven.javadoc.artifactID}</artifactId>
				<inherited>true</inherited>
			</plugin>
			<plugin>
				<artifactId>${maven.jar.artifactID}</artifactId>
				<inherited>true</inherited>
			</plugin>
			<!-- JaCoCo for Code Coverage -->
			<plugin>
				<groupId>${jacoco.groupID}</groupId>
				<artifactId>${jacoco.artifactID}</artifactId>
				<inherited>true</inherited>
			</plugin>
		</plugins>
	</build>
</project>