<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.voomdoon</groupId>
	<artifactId>vd-parent</artifactId>
	<version>0.2.4</version>

	<packaging>pom</packaging>
	
	<name>vd-parent</name>
	<description>parent module for all voomdoon modules</description>
    <url>https://github.com/voomdoon/vd-parent</url>

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

	<developers>
		<developer>
			<name>André Schulz</name>
		</developer>
	</developers>

	<scm>
		<url>https://github.com/voomdoon/vd-parent</url>
		<connection>scm:git:https://github.com/voomdoon/vd-parent.git</connection>
		<developerConnection>scm:git:git@github.com:voomdoon/vd-parent.git</developerConnection>
		<tag>0.2.4</tag>
	</scm>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<maven.compiler.source>21</maven.compiler.source>
		<maven.compiler.target>21</maven.compiler.target>
		<!-- Default for Surefire's late @{argLine} expansion; profiles/plugins may append JVM args. -->
		<argLine />
		<!-- Opt-in Java agent hook for test dependencies such as Mockito inline mocking. -->
		<mockito.agent.argLine />

		<sonar.organization>voomdoon</sonar.organization>
		<sonar.host.url>https://sonarcloud.io</sonar.host.url>

		<skipTestJar>true</skipTestJar>
	</properties>

	<distributionManagement>
		<snapshotRepository>
			<id>central</id>
			<url>https://central.sonatype.com/publish-snapshots</url>
		</snapshotRepository>
		<repository>
			<id>central</id>
			<url>https://central.sonatype.com/publish</url>
		</repository>
	</distributionManagement>

	<build>
		<plugins>
			<!-- + + + + + testing + + + + + -->
			<plugin>
				<!-- Exposes dependency jar path properties for opt-in test JVM agents. -->
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<version>3.10.0</version>
				<executions>
					<execution>
						<goals>
							<goal>properties</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>3.5.6</version>
				<configuration>
					<argLine>@{argLine} ${mockito.agent.argLine} -Xshare:off</argLine>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.pitest</groupId>
				<artifactId>pitest-maven</artifactId>
				<version>1.25.5</version>
				<configuration>
					<avoidCallsTo>
						<avoidCallsTo>de.voomdoon.logging.Logger</avoidCallsTo>
					</avoidCallsTo>
				</configuration>
				<dependencies>
					<dependency>
						<groupId>org.pitest</groupId>
						<artifactId>pitest-junit5-plugin</artifactId>
						<version>1.2.3</version>
					</dependency>
				</dependencies>
			</plugin>
			<!-- - - - - - testing - - - - - -->

			<!-- + + + + + building + + + + + -->
			<!-- Pin default lifecycle plugins to avoid Maven plugin validation warnings in child modules. -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<version>3.5.0</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.15.0</version>
			</plugin>
			<plugin>
				<inherited>true</inherited>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>3.4.0</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>3.5.0</version>
				<executions>
					<execution>
						<id>build-test-jar</id>
						<goals>
							<goal>test-jar</goal>
						</goals>
						<configuration>
							<skip>${skipTestJar}</skip>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<!-- - - - - - building - - - - - -->
		</plugins>
	</build>

	<profiles>
		<!-- + + + + + ci + + + + + -->
		<profile>
			<id>ci</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.jacoco</groupId>
						<artifactId>jacoco-maven-plugin</artifactId>
						<version>0.8.15</version>
						<executions>
							<execution>
								<id>prepare-agent</id>
								<goals>
									<goal>prepare-agent</goal>
								</goals>
							</execution>
							<execution>
								<id>report</id>
								<phase>test</phase>
								<goals>
									<goal>report</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<!-- - - - - - ci  - - - - - -->

		<!-- + + + + + release + + + + + -->
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-release-plugin</artifactId>
						<version>3.3.1</version>
						<configuration>
							<tagNameFormat>@{project.version}</tagNameFormat>
							<autoVersionSubmodules>true</autoVersionSubmodules>
							<goals>deploy</goals>
							<arguments>-Prelease</arguments>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-enforcer-plugin</artifactId>
						<version>3.6.3</version>
						<executions>
							<execution>
								<id>release-safety</id>
								<phase>validate</phase>
								<goals>
									<goal>enforce</goal>
								</goals>
								<configuration>
									<rules>
										<requireReleaseVersion />
									</rules>
								</configuration>
								<inherited>true</inherited>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.sonatype.central</groupId>
						<artifactId>central-publishing-maven-plugin</artifactId>
						<version>0.11.0</version>
						<extensions>true</extensions>
						<configuration>
							<publishingServerId>central</publishingServerId>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>3.2.8</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>3.12.0</version>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<!-- - - - - - release  - - - - - -->
	</profiles>
</project>
