<!--
  ~ DazzleConf
  ~ Copyright © 2025 Anand Beh
  ~
  ~ DazzleConf is free software: you can redistribute it and/or modify
  ~ it under the terms of the GNU Lesser General Public License as published by
  ~ the Free Software Foundation, either version 3 of the License, or
  ~ (at your option) any later version.
  ~
  ~ DazzleConf is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  ~ GNU Lesser General Public License for more details.
  ~
  ~ You should have received a copy of the GNU Lesser General Public License
  ~ along with DazzleConf. If not, see <https://www.gnu.org/licenses/>
  ~ and navigate to version 3 of the GNU Lesser General Public 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>space.arim.dazzleconf</groupId>
	<artifactId>dazzleconf-parent</artifactId>
	<version>2.0.0-M2</version>
	<packaging>pom</packaging>
	
	<name>DazzleConf</name>
	<description>Powerful, type-safe configuration solution based on immutable interfaces.</description>
	<url>https://github.com/A248/DazzleConf</url>
	<inceptionYear>2020</inceptionYear>
	
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

		<checkerqual.version>3.49.2</checkerqual.version>
		<apiguardian.version>1.1.2</apiguardian.version>
		<junit.version>5.13.0</junit.version>
		<mockito.version>5.1.1</mockito.version>
		<equalsverifier.version>3.19.2</equalsverifier.version>
	</properties>
	
	<scm>
		<connection>scm:git:ssh://git@github.com/A248/DazzleConf.git</connection>
		<developerConnection>scm:git:ssh://git@github.com/A248/DazzleConf.git</developerConnection>
		<url>http://github.com/A248/DazzleConf/tree/master</url>
	  <tag>2.0.0-M2</tag>
  </scm>
	
	<licenses>
		<license>
			<name>GNU Lesser General Public License, Version 3</name>
			<url>https://www.gnu.org/licenses/lgpl-3.0-standalone.html</url>
			<distribution>repo</distribution>
		</license>
	</licenses>
	
	<developers>
		<developer>
			<id>anandbeh</id>
			<name>Anand Beh</name>
			<email>a248-dev@tuta.io</email>
			<url>https://github.com/A248</url>
			<roles>
				<role>creator</role>
				<role>developer</role>
			</roles>
			<timezone>America/New_York</timezone>
		</developer>
	</developers>

	<build>
		<plugins>
			<!-- Sources and javadoc -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>3.2.1</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>3.5.0</version>
				<configuration>
					<source>8</source>
				</configuration>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>javadoc</goal>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-enforcer-plugin</artifactId>
				<version>3.2.1</version>
				<executions>
					<execution>
						<id>enforce-rules</id>
						<goals>
							<goal>enforce</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<rules>
						<requireJavaVersion>
							<version>21</version>
							<message>While this library maintains runtime compatibility with Java 8,
								it requires JDK 21 as a build-time requirement.</message>
						</requireJavaVersion>
						<requireNoRepositories>
							<message>Third-party repositories are not allowed</message>
						</requireNoRepositories>
						<requireReleaseDeps>
							<message>No snapshot dependencies are allowed</message>
							<!-- Prevent false positives on self-dependencies -->
							<onlyWhenRelease>true</onlyWhenRelease>
						</requireReleaseDeps>
					</rules>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-gpg-plugin</artifactId>
				<version>3.2.7</version>
				<executions>
					<execution>
						<id>sign-artifacts</id>
						<phase>verify</phase>
						<goals>
							<goal>sign</goal>
						</goals>
						<configuration>
							<bestPractices>true</bestPractices>
							<gpgArguments>
								<arg>--pinentry-mode</arg>
								<arg>loopback</arg>
							</gpgArguments>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>3.1.1</version>
				<configuration>
					<autoVersionSubmodules>true</autoVersionSubmodules>
					<tagNameFormat>@{project.version}</tagNameFormat>
					<preparationGoals>--quiet help:help</preparationGoals>
					<goals>clean deploy -DskipTests -DskipPitest -Dinvoker.skip=true -Prelease-to-central</goals>
					<pushChanges>false</pushChanges>
					<localCheckout>true</localCheckout>
				</configuration>
			</plugin>
		</plugins>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.14.0</version>
					<configuration>
						<testRelease>21</testRelease>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>3.4.2</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-shade-plugin</artifactId>
					<version>3.6.0</version>
					<executions>
						<execution>
							<phase>package</phase>
							<goals>
								<goal>shade</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.moditect</groupId>
					<artifactId>moditect-maven-plugin</artifactId>
					<version>1.2.2.Final</version>
					<executions>
						<execution>
							<id>add-module-info</id>
							<phase>package</phase>
							<goals>
								<goal>add-module-info</goal>
							</goals>
							<configuration>
								<overwriteExistingFiles>true</overwriteExistingFiles>
							</configuration>
						</execution>
					</executions>
					<configuration>
						<failOnWarning>true</failOnWarning>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>3.5.3</version>
					<configuration>
						<argLine>-XX:TieredStopAtLevel=1 -XX:-TieredCompilation</argLine>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-invoker-plugin</artifactId>
					<version>3.6.0</version>
					<executions>
						<execution>
							<id>install-artifacts</id>
							<goals>
								<goal>install</goal>
							</goals>
						</execution>
						<execution>
							<id>test-api-consumers</id>
							<goals>
								<goal>integration-test</goal>
							</goals>
						</execution>
						<execution>
							<id>verify-api-consumers</id>
							<goals>
								<goal>verify</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
						<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
						<settingsFile>src/it/settings.xml</settingsFile>
						<goals>verify</goals>
						<streamLogsOnFailures>true</streamLogsOnFailures>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-install-plugin</artifactId>
					<version>3.1.4</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-deploy-plugin</artifactId>
					<version>3.1.4</version>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<profiles>
		<profile>
			<id>release-to-central</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.sonatype.central</groupId>
						<artifactId>central-publishing-maven-plugin</artifactId>
						<version>0.7.0</version>
						<extensions>true</extensions>
						<configuration>
							<publishingServerId>central</publishingServerId>
							<checksums>all</checksums>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<modules>
		<module>core</module>
		<module>backend-hocon</module>
		<module>backend-toml</module>
		<module>backend-yaml</module>
    </modules>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>space.arim.dazzleconf</groupId>
				<artifactId>dazzleconf-core</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>org.checkerframework</groupId>
				<artifactId>checker-qual</artifactId>
				<version>${checkerqual.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apiguardian</groupId>
				<artifactId>apiguardian-api</artifactId>
				<version>${apiguardian.version}</version>
			</dependency>
			<dependency>
				<groupId>org.junit.jupiter</groupId>
				<artifactId>junit-jupiter</artifactId>
				<version>${junit.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.mockito</groupId>
				<artifactId>mockito-junit-jupiter</artifactId>
				<version>${mockito.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>nl.jqno.equalsverifier</groupId>
				<artifactId>equalsverifier</artifactId>
				<version>${equalsverifier.version}</version>
				<scope>test</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>
</project>
