<!--

    Copyright © 2025 VenaNocta (venanocta@gmail.com)

    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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<groupId>net.runeduniverse.lib.utils</groupId>
	<artifactId>utils-parent</artifactId>
	<version>2.1.0</version>
	<packaging>pom</packaging>

	<name>Utils-Project Maven Parent</name>
	<description>RunedUniverse Utilities Project</description>
	<url>https://github.com/RunedUniverse/utils</url>
	<inceptionYear>2021</inceptionYear>

	<modules>
		<module>java-utils-bom</module>
		<module>java-utils-async-api</module>
		<module>java-utils-async</module>
		<module>java-utils-chain-api</module>
		<module>java-utils-chain</module>
		<module>java-utils-common-api</module>
		<module>java-utils-common</module>
		<module>java-utils-conditional-api</module>
		<module>java-utils-conditional</module>
		<module>java-utils-config-api</module>
		<module>java-utils-config</module>
		<module>java-utils-errors</module>
		<module>java-utils-logging-api</module>
		<module>java-utils-logging</module>
		<module>java-utils-maven3-api</module>
		<module>java-utils-maven3</module>
		<module>java-utils-maven3-ext-api</module>
		<module>java-utils-maven3-ext</module>
		<module>java-utils-plexus</module>
		<module>java-utils-scanner-api</module>
		<module>java-utils-scanner</module>
	</modules>

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

	<organization>
		<name>RunedUniverse</name>
		<url>https://www.runeduniverse.net</url>
	</organization>

	<developers>
		<developer>
			<id>venanocta</id>
			<name>VenaNocta</name>
			<email>venanocta@gmail.com</email>
			<organization>RunedUniverse</organization>
			<organizationUrl>https://www.runeduniverse.net</organizationUrl>
			<timezone>Europe/Vienna</timezone>
			<roles>
				<role>Maintainer</role>
				<role>Developer</role>
			</roles>
		</developer>
	</developers>

	<scm>
		<url>https://github.com/RunedUniverse/utils</url>
		<connection>scm:git:git://github.com/RunedUniverse/utils.git</connection>
		<developerConnection>scm:git:git@github.com:RunedUniverse/utils.git</developerConnection>
	</scm>
	<issueManagement>
		<system>GitHub Issues</system>
		<url>https://github.com/RunedUniverse/utils/issues</url>
	</issueManagement>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<root-dir>${project.basedir}</root-dir>
		<!-- sources -->
		<toolchain-jdk-source-version>openjdk-1.8.0</toolchain-jdk-source-version>
		<java-source-version>1.8</java-source-version>
		<java-target-version>${java-source-version}</java-target-version>
		<!-- tests -->
		<toolchain-jdk-test-version>${toolchain-jdk-source-version}</toolchain-jdk-test-version>
		<java-test-source-version>${java-source-version}</java-test-source-version>
		<java-test-target-version>${java-test-source-version}</java-test-target-version>
		<!-- ARTIFACT VERSIONS -->
		<maven-version-min>3.3.9</maven-version-min>
		<lombok-version>1.18.12</lombok-version>
		<plexus-component-version>1.7.1</plexus-component-version>
		<!-- ARTIFACT VERSIONS - COMPILER -->
		<plugin-maven-clean-version>3.1.0</plugin-maven-clean-version>
		<plugin-maven-toolchains-version>3.1.0</plugin-maven-toolchains-version>
		<plugin-maven-resources-version>3.2.0</plugin-maven-resources-version>
		<plugin-maven-compiler-version>3.8.0</plugin-maven-compiler-version>
		<plugin-maven-jar-version>3.0.2</plugin-maven-jar-version>
		<plugin-maven-source-version>3.2.1</plugin-maven-source-version>
		<plugin-maven-javadoc-version>3.2.0</plugin-maven-javadoc-version>
		<plugin-maven-surefire-version>3.0.0-M5</plugin-maven-surefire-version>
		<plugin-maven-install-version>3.0.0-M1</plugin-maven-install-version>
		<plugin-revelc-formatter-version>2.23.0</plugin-revelc-formatter-version>
		<plugin-mycila-license-version>4.2.rc1</plugin-mycila-license-version>
		<!-- VERSIONS - TESTING -->
		<junit-platform-launcher-version>1.8.2</junit-platform-launcher-version>
		<junit-platform-runner-version>1.8.2</junit-platform-runner-version>
		<junit-jupiter-api-version>5.8.2</junit-jupiter-api-version>
		<junit-jupiter-engine-version>5.8.2</junit-jupiter-engine-version>
	</properties>

	<profiles>
		<!-- TOOLCHAINS -->
		<profile>
			<id>toolchain-openjdk-1-8-0</id>
			<properties>
				<jdk-toolchain-source-version>openjdk-1.8.0</jdk-toolchain-source-version>
				<jdk-toolchain-test-version>openjdk-1.8.0</jdk-toolchain-test-version>
			</properties>
		</profile>
		<!-- DEV-INSTALL -->
		<profile>
			<id>dev-install</id>
			<properties>
				<jdk-toolchain-source-version>openjdk-1.8.0</jdk-toolchain-source-version>
				<jdk-toolchain-test-version>openjdk-1.8.0</jdk-toolchain-test-version>
			</properties>
			<build>
				<defaultGoal>clean dev/install]</defaultGoal>
				<pluginManagement>
					<plugins>
						<plugin>
							<groupId>org.apache.maven.plugins</groupId>
							<artifactId>maven-surefire-plugin</artifactId>
							<configuration>
								<groups>system</groups>
							</configuration>
						</plugin>
					</plugins>
				</pluginManagement>
			</build>
		</profile>
		<profile>
			<id>format</id>
			<build>
				<defaultGoal>dev/validate</defaultGoal>
			</build>
		</profile>
		<!-- PIPELINE -->
		<profile>
			<id>debug</id>
			<properties>
				<r4m.fancy-output>false</r4m.fancy-output>
			</properties>
			<build>
				<defaultGoal>help@pipeline</defaultGoal>
			</build>
		</profile>
		<profile>
			<id>validate</id>
			<build>
				<defaultGoal>check/[validate]@pipeline</defaultGoal>
			</build>
		</profile>
		<profile>
			<id>install</id>
			<build>
				<defaultGoal>
					clean@pipeline
					install/install]@pipeline
				</defaultGoal>
			</build>
		</profile>
		<profile>
			<id>build-tests</id>
			<build>
				<defaultGoal>
					junit/test-compile]@pipeline
				</defaultGoal>
			</build>
		</profile>
		<profile>
			<id>test-junit-jupiter</id>
			<build>
				<defaultGoal>
					junit/validate@pipeline
					junit/test@pipeline
				</defaultGoal>
			</build>
		</profile>
		<profile>
			<id>test-system</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-plugin</artifactId>
						<configuration>
							<groups>system</groups>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		<!-- REPOSITORIES -->
		<profile>
			<id>repo-releases</id>
			<repositories>
				<repository>
					<id>runeduniverse-releases</id>
					<url>
						https://nexus.runeduniverse.net/repository/maven-releases/
					</url>
				</repository>
			</repositories>
		</profile>
		<profile>
			<!-- dev-repo contains: build-helper-java & development builds -->
			<id>repo-development</id>
			<repositories>
				<repository>
					<id>runeduniverse-development</id>
					<url>
						https://nexus.runeduniverse.net/repository/maven-development/
					</url>
				</repository>
			</repositories>
		</profile>
		<!-- LICENSES -->
		<profile>
			<id>license-apache2-approve</id>
			<activation>
				<property>
					<name>license-apache2-approve</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>com.mycila</groupId>
						<artifactId>license-maven-plugin</artifactId>
						<configuration>
							<dependencyPolicies combine.children="append">
								<dependencyPolicy>
									<type>LICENSE_NAME</type>
									<rule>APPROVE</rule>
									<value>Apache License, Version 2</value>
								</dependencyPolicy>
								<dependencyPolicy>
									<type>LICENSE_NAME</type>
									<rule>APPROVE</rule>
									<value>
										The Apache Software License, Version 2.0
									</value>
								</dependencyPolicy>
								<dependencyPolicy>
									<type>LICENSE_URL</type>
									<rule>APPROVE</rule>
									<value>
										http://www.apache.org/licenses/LICENSE-2.0
									</value>
								</dependencyPolicy>
								<dependencyPolicy>
									<type>LICENSE_URL</type>
									<rule>APPROVE</rule>
									<value>
										https://www.apache.org/licenses/LICENSE-2.0
									</value>
								</dependencyPolicy>
								<dependencyPolicy>
									<type>LICENSE_URL</type>
									<rule>APPROVE</rule>
									<value>
										http://www.apache.org/licenses/LICENSE-2.0.txt
									</value>
								</dependencyPolicy>
								<dependencyPolicy>
									<type>LICENSE_URL</type>
									<rule>APPROVE</rule>
									<value>
										https://www.apache.org/licenses/LICENSE-2.0.txt
									</value>
								</dependencyPolicy>
							</dependencyPolicies>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>license-epl-v10-approve</id>
			<activation>
				<property>
					<name>license-epl-v10-approve</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>com.mycila</groupId>
						<artifactId>license-maven-plugin</artifactId>
						<configuration>
							<dependencyPolicies combine.children="append">
								<dependencyPolicy>
									<type>LICENSE_NAME</type>
									<rule>APPROVE</rule>
									<value>Eclipse Public License, Version 1.0</value>
								</dependencyPolicy>
								<dependencyPolicy>
									<type>LICENSE_URL</type>
									<rule>APPROVE</rule>
									<value>
										http://www.eclipse.org/legal/epl-v10.html
									</value>
								</dependencyPolicy>
								<dependencyPolicy>
									<type>LICENSE_URL</type>
									<rule>APPROVE</rule>
									<value>
										https://www.eclipse.org/legal/epl-v10.html
									</value>
								</dependencyPolicy>
							</dependencyPolicies>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.projectlombok</groupId>
				<artifactId>lombok</artifactId>
				<version>${lombok-version}</version>
				<scope>provided</scope>
			</dependency>
			<dependency>
				<groupId>org.junit.jupiter</groupId>
				<artifactId>junit-jupiter-api</artifactId>
				<version>${junit-jupiter-api-version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.junit.jupiter</groupId>
				<artifactId>junit-jupiter-engine</artifactId>
				<version>${junit-jupiter-engine-version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.junit.platform</groupId>
				<artifactId>junit-platform-launcher</artifactId>
				<version>${junit-platform-launcher-version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.junit.platform</groupId>
				<artifactId>junit-platform-runner</artifactId>
				<version>${junit-platform-runner-version}</version>
				<scope>test</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<build>
		<resources>
			<resource>
				<directory>${basedir}</directory>
				<targetPath>META-INF</targetPath>
				<includes>
					<include>LICENSE</include>
				</includes>
			</resource>
		</resources>
		<testResources>
			<testResource>
				<directory>src/test/resources</directory>
			</testResource>
		</testResources>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-clean-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-toolchains-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>toolchain</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>net.revelc.code.formatter</groupId>
				<artifactId>formatter-maven-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>com.mycila</groupId>
				<artifactId>license-maven-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-install-plugin</artifactId>
			</plugin>
		</plugins>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-clean-plugin</artifactId>
					<version>${plugin-maven-clean-version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-toolchains-plugin</artifactId>
					<version>${plugin-maven-toolchains-version}</version>
					<configuration>
						<toolchains>
							<jdk>
								<version>${toolchain-jdk-source-version}</version>
							</jdk>
						</toolchains>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-resources-plugin</artifactId>
					<version>${plugin-maven-resources-version}</version>
				</plugin>
				<plugin>
					<groupId>net.revelc.code.formatter</groupId>
					<artifactId>formatter-maven-plugin</artifactId>
					<version>${plugin-revelc-formatter-version}</version>
					<configuration>
						<configFile>
							${root-dir}/.code-formats/runed-code-format-java.xml
						</configFile>
						<lineEnding>LF</lineEnding>
						<skipHtmlFormatting>true</skipHtmlFormatting>
						<skipJsFormatting>true</skipJsFormatting>
						<skipCssFormatting>true</skipCssFormatting>
					</configuration>
				</plugin>
				<plugin>
					<groupId>com.mycila</groupId>
					<artifactId>license-maven-plugin</artifactId>
					<version>${plugin-mycila-license-version}</version>
					<configuration>
						<properties>
							<year>2025</year>
							<owner>VenaNocta</owner>
							<email>venanocta@gmail.com</email>
						</properties>
						<mapping>
							<java>SLASHSTAR_STYLE</java>
						</mapping>
						<licenseSets>
							<licenseSet>
								<header>${root-dir}/.licenses/apache2-header.txt</header>
								<excludes>
									<exclude>.build/**</exclude>
									<exclude>.mvn/**</exclude>
									<exclude>.code-formats/**</exclude>
									<exclude>**/resources/**</exclude>
									<exclude>**/license/**</exclude>
									<exclude>**/target/**</exclude>
									<exclude>Jenkinsfile</exclude>
								</excludes>
							</licenseSet>
						</licenseSets>
						<dependencyEnforce>${license-enforce}</dependencyEnforce>
						<dependencyExceptionMessage>1 or more dependencies got
							rejected doe to invalid licenses! Contact the
							Maintainer for a solution!</dependencyExceptionMessage>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.codehaus.plexus</groupId>
					<artifactId>plexus-component-metadata</artifactId>
					<version>${plexus-component-version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>${plugin-maven-compiler-version}</version>
					<configuration>
						<source>${java-source-version}</source>
						<target>${java-target-version}</target>
						<testSource>${java-test-source-version}</testSource>
						<testTarget>${java-test-target-version}</testTarget>
						<!-- use starting with version 3.12.0-->
						<!--
						<annotationProcessorPathsUseDepMgmt>true</annotationProcessorPathsUseDepMgmt>
						-->
						<annotationProcessorPaths>
							<path>
								<groupId>org.projectlombok</groupId>
								<artifactId>lombok</artifactId>
								<version>${lombok-version}</version>
							</path>
						</annotationProcessorPaths>
					</configuration>
					<executions>
						<execution>
							<id>source-compile</id>
							<configuration>
								<jdkToolchain>
									<version>${toolchain-jdk-source-version}</version>
								</jdkToolchain>
							</configuration>
						</execution>
						<execution>
							<id>test-compile</id>
							<configuration>
								<jdkToolchain>
									<version>${toolchain-jdk-test-version}</version>
								</jdkToolchain>
							</configuration>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>${plugin-maven-jar-version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>${plugin-maven-source-version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>${plugin-maven-javadoc-version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>${plugin-maven-surefire-version}</version>
					<configuration>
						<trimStackTrace>false</trimStackTrace>
					</configuration>
					<executions>
						<execution>
							<id>test-compile</id>
							<configuration>
								<jdkToolchain>
									<version>${toolchain-jdk-test-version}</version>
								</jdkToolchain>
							</configuration>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-install-plugin</artifactId>
					<version>${plugin-maven-install-version}</version>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>
</project>
