<?xml version="1.0" encoding="UTF-8"?>
<!--
   Copyright 2012–2025 Michael Osipov

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
-->
<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>net.sf.michael-o</groupId>
	<artifactId>michael-o-parent</artifactId>
	<version>20</version>
	<packaging>pom</packaging>

	<name>Michael Osipov's Parent POM</name>
	<description>Parent POM for all projects created by Michael Osipov</description>
	<url>https://github.com/michael-o/michael-o-parent</url>
	<inceptionYear>2012</inceptionYear>
	<organization>
		<name>Michael Osipov</name>
		<url>https://github.com/michael-o</url>
	</organization>
	<licenses>
		<license>
			<name>Apache License, Version 2.0</name>
			<url>LICENSE.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<developers>
		<developer>
			<id>michael-o</id>
			<name>Michael Osipov</name>
			<email>1983-01-06@gmx.net</email>
			<url>https://github.com/michael-o</url>
			<timezone>Europe/Berlin</timezone>
		</developer>
	</developers>

	<scm>
		<connection>scm:git:https://github.com/michael-o/michael-o-parent.git</connection>
		<developerConnection>scm:git:https://github.com/michael-o/michael-o-parent.git</developerConnection>
		<tag>20</tag>
		<url>https://github.com/michael-o/michael-o-parent</url>
	</scm>
	<distributionManagement>
		<repository>
			<id>sonatype-nexus-staging</id>
			<name>Nexus Release Repository</name>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
		<snapshotRepository>
			<id>sonatype-nexus-snapshots</id>
			<name>Sonatype Nexus Snapshots</name>
			<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
		</snapshotRepository>
	</distributionManagement>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

		<requiredJavaVersion>8</requiredJavaVersion>
		<requiredMavenVersion>3.6.3</requiredMavenVersion>
		<surefirePluginVersion>3.5.3</surefirePluginVersion>
		<javadocPluginVersion>3.11.2</javadocPluginVersion>

		<project.build.outputTimestamp>2025-05-08T08:48:25Z</project.build.outputTimestamp>
	</properties>

	<build>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
			</resource>
			<resource>
				<targetPath>META-INF</targetPath>
				<directory>${basedir}</directory>
				<includes>
					<include>LICENSE.txt</include>
				</includes>
			</resource>
		</resources>
		<pluginManagement>
			<plugins>
				<plugin>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.14.0</version>
				</plugin>
				<plugin>
					<artifactId>maven-source-plugin</artifactId>
					<version>3.3.1</version>
					<configuration>
						<archive>
							<manifest>
								<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
							</manifest>
						</archive>
					</configuration>
				</plugin>
				<plugin>
					<artifactId>maven-jar-plugin</artifactId>
					<version>3.4.2</version>
					<configuration>
						<archive>
							<manifest>
								<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
							</manifest>
						</archive>
					</configuration>
				</plugin>
				<plugin>
					<artifactId>maven-assembly-plugin</artifactId>
					<version>3.7.1</version>
				</plugin>
				<plugin>
					<artifactId>maven-release-plugin</artifactId>
					<version>3.1.1</version>
					<configuration>
						<mavenExecutorId>forked-path</mavenExecutorId>
						<tagNameFormat>@{project.version}</tagNameFormat>
						<autoVersionSubmodules>true</autoVersionSubmodules>
						<releaseProfiles>michael-o-release</releaseProfiles>
						<goals>deploy</goals>
					</configuration>
				</plugin>
				<plugin>
					<artifactId>maven-deploy-plugin</artifactId>
					<version>3.1.4</version>
				</plugin>
				<plugin>
					<artifactId>maven-help-plugin</artifactId>
					<version>3.5.1</version>
				</plugin>
				<plugin>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>${javadocPluginVersion}</version>
					<configuration>
						<archive>
							<manifest>
								<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
							</manifest>
						</archive>
						<quiet>true</quiet>
						<notimestamp>true</notimestamp>
					</configuration>
				</plugin>
				<plugin>
					<artifactId>maven-resources-plugin</artifactId>
					<version>3.3.1</version>
				</plugin>
				<plugin>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>${surefirePluginVersion}</version>
				</plugin>
				<plugin>
					<artifactId>maven-war-plugin</artifactId>
					<version>3.4.0</version>
				</plugin>
				<plugin>
					<artifactId>maven-install-plugin</artifactId>
					<version>3.1.4</version>
				</plugin>
				<plugin>
					<artifactId>maven-dependency-plugin</artifactId>
					<version>3.8.1</version>
				</plugin>
				<plugin>
					<artifactId>maven-clean-plugin</artifactId>
					<version>3.4.1</version>
				</plugin>
				<plugin>
					<artifactId>maven-site-plugin</artifactId>
					<version>3.21.0</version>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>versions-maven-plugin</artifactId>
					<version>2.18.0</version>
					<configuration>
						<generateBackupPoms>false</generateBackupPoms>
					</configuration>
				</plugin>
				<plugin>
					<artifactId>maven-gpg-plugin</artifactId>
					<version>3.2.7</version>
				</plugin>
				<plugin>
					<artifactId>maven-shade-plugin</artifactId>
					<version>3.6.0</version>
				</plugin>
				<plugin>
					<artifactId>maven-antrun-plugin</artifactId>
					<version>3.1.0</version>
				</plugin>
				<plugin>
					<artifactId>maven-enforcer-plugin</artifactId>
					<version>3.5.0</version>
				</plugin>
				<plugin>
					<artifactId>maven-scm-publish-plugin</artifactId>
					<version>3.3.0</version>
					<configuration>
						<checkoutDirectory>${user.home}/maven-sites/${project.artifactId}</checkoutDirectory>
						<scmBranch>gh-pages</scmBranch>
						<tryUpdate>true</tryUpdate>
					</configuration>
				</plugin>
				<plugin>
					<groupId>com.diffplug.spotless</groupId>
					<artifactId>spotless-maven-plugin</artifactId>
					<version>2.44.3</version>
					<configuration>
						<java>
							<palantirJavaFormat>
								<version>2.63.0</version>
								<formatJavadoc>true</formatJavadoc>
							</palantirJavaFormat>
							<importOrder>
								<order>java,javax,com,net,org,\#</order>
							</importOrder>
							<removeUnusedImports />
							<trimTrailingWhitespace />
							<endWithNewline />
							<formatAnnotations />
							<indent>
								<tabs>true</tabs>
								<spacesPerTab>4</spacesPerTab>
							</indent>
						</java>
						<pom>
							<sortPom>
								<nrOfIndentSpace>-1</nrOfIndentSpace>
								<expandEmptyElements>false</expandEmptyElements>
								<quiet>true</quiet>
							</sortPom>
						</pom>
						<upToDateChecking>
							<enabled>true</enabled>
						</upToDateChecking>
					</configuration>
					<executions>
						<execution>
							<goals>
								<goal>check</goal>
							</goals>
							<phase>process-sources</phase>
						</execution>
					</executions>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<artifactId>maven-enforcer-plugin</artifactId>
				<executions>
					<execution>
						<id>enforce-java</id>
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
							<rules>
								<requireJavaVersion>
									<version>${requiredJavaVersion}</version>
									<message>This project requires at least Java ${requiredJavaVersion}</message>
								</requireJavaVersion>
							</rules>
						</configuration>
					</execution>
					<execution>
						<id>enforce-maven</id>
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
							<rules>
								<requireMavenVersion>
									<version>${requiredMavenVersion}</version>
									<message>This project requires at least Maven ${requiredMavenVersion}</message>
								</requireMavenVersion>
							</rules>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-site-plugin</artifactId>
				<executions>
					<execution>
						<id>attach-descriptor</id>
						<goals>
							<goal>attach-descriptor</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<executions>
					<execution>
						<id>bundle-site-resources</id>
						<goals>
							<goal>single</goal>
						</goals>
						<phase>package</phase>
						<inherited>false</inherited>
						<configuration>
							<descriptors>
								<descriptor>src/assembly/site-resources.xml</descriptor>
							</descriptors>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<reporting>
		<plugins>
			<plugin>
				<artifactId>maven-project-info-reports-plugin</artifactId>
				<version>3.9.0</version>
				<reportSets>
					<reportSet>
						<reports>
							<report>index</report>
							<report>summary</report>
							<report>team</report>
							<report>licenses</report>
							<report>scm</report>
							<report>issue-management</report>
							<report>modules</report>
							<report>dependencies</report>
							<report>dependency-info</report>
						</reports>
					</reportSet>
				</reportSets>
			</plugin>
			<plugin>
				<artifactId>maven-jxr-plugin</artifactId>
				<version>3.6.0</version>
				<reportSets>
					<reportSet>
						<reports>
							<report>jxr</report>
							<report>test-jxr</report>
						</reports>
					</reportSet>
				</reportSets>
			</plugin>
			<plugin>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>${javadocPluginVersion}</version>
				<configuration>
					<quiet>true</quiet>
					<notimestamp>true</notimestamp>
				</configuration>
				<reportSets>
					<reportSet>
						<reports>
							<report>javadoc</report>
							<report>test-javadoc</report>
						</reports>
					</reportSet>
				</reportSets>
			</plugin>
			<plugin>
				<artifactId>maven-pmd-plugin</artifactId>
				<version>3.26.0</version>
				<configuration>
					<skipEmptyReport>true</skipEmptyReport>
				</configuration>
				<reportSets>
					<reportSet>
						<reports>
							<report>pmd</report>
							<report>cpd</report>
						</reports>
					</reportSet>
				</reportSets>
			</plugin>
			<plugin>
				<groupId>com.github.spotbugs</groupId>
				<artifactId>spotbugs-maven-plugin</artifactId>
				<version>4.8.6.6</version>
				<configuration>
					<skipEmptyReport>true</skipEmptyReport>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-surefire-report-plugin</artifactId>
				<version>${surefirePluginVersion}</version>
				<configuration>
					<alwaysGenerateSurefireReport>false</alwaysGenerateSurefireReport>
				</configuration>
			</plugin>
		</plugins>
	</reporting>

	<profiles>
		<profile>
			<id>michael-o-release</id>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-resources-plugin</artifactId>
						<executions>
							<execution>
								<id>javadoc-resources</id>
								<goals>
									<goal>copy-resources</goal>
								</goals>
								<phase>generate-resources</phase>
								<configuration>
									<outputDirectory>${project.build.directory}/apidocs</outputDirectory>
									<resources>
										<resource>
											<directory>${basedir}</directory>
											<targetPath>META-INF</targetPath>
											<includes>
												<include>LICENSE.txt</include>
											</includes>
										</resource>
									</resources>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<artifactId>maven-source-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<goal>jar-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<artifactId>maven-javadoc-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<artifactId>maven-gpg-plugin</artifactId>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<goals>
									<goal>sign</goal>
								</goals>
								<phase>verify</phase>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<artifactId>maven-deploy-plugin</artifactId>
						<configuration>
							<updateReleaseInfo>true</updateReleaseInfo>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>java11+</id>
			<activation>
				<jdk>[11,)</jdk>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>com.diffplug.spotless</groupId>
						<artifactId>spotless-maven-plugin</artifactId>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
