<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>com.github.mvallim</groupId>
	<artifactId>java-fluent-validator</artifactId>
	<version>1.10.1</version>
	<packaging>jar</packaging>

	<properties>
		<project.build.outputEncoding>UTF-8</project.build.outputEncoding>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<project.reporting.sourceEncoding>UTF-8</project.reporting.sourceEncoding>

		<maven.compile.encoding>UTF-8</maven.compile.encoding>
		<maven.compiler.source>${java.version}</maven.compiler.source>
		<maven.compiler.target>${java.version}</maven.compiler.target>

		<!-- Dependencies -->
		<logback.version>1.3.14</logback.version>
		<mockito.version>4.11.0</mockito.version>
		<junit.jupiter.version>5.10.2</junit.jupiter.version>
		<awaitility.version>4.2.2</awaitility.version>
		<assertj-core.version>3.27.7</assertj-core.version>
		<slf4j-api.version>2.0.6</slf4j-api.version>
		<hamcrest.version>3.0</hamcrest.version>

		<!-- Plugins -->
		<maven-clean-plugin.version>3.2.0</maven-clean-plugin.version>
		<maven-compiler-plugin.version>3.12.1</maven-compiler-plugin.version>
		<maven-deploy-plugin.version>3.0.0</maven-deploy-plugin.version>
		<maven-install-plugin.version>3.1.0</maven-install-plugin.version>
		<maven-release-plugin.version>3.1.1</maven-release-plugin.version>
		<maven-resources-plugin.version>3.4.0</maven-resources-plugin.version>
		<maven-source-plugin.version>3.2.1</maven-source-plugin.version>
		<maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
		<maven-javadoc-plugin.version>3.12.0</maven-javadoc-plugin.version>
		<maven-gpg-plugin.version>3.2.8</maven-gpg-plugin.version>
		<jacoco-maven-plugin.version>0.8.12</jacoco-maven-plugin.version>
		<sonar-maven-plugin.version>4.0.0.4121</sonar-maven-plugin.version>
		<central-publishing-maven-plugin.version>0.8.0</central-publishing-maven-plugin.version>

		<sonar.exclusions>**/test/**,**/ValidationExceptionAdvice**</sonar.exclusions>
	</properties>

	<scm>
		<url>scm:git:https://github.com/mvallim/java-fluent-validator.git</url>
		<connection>scm:git:https://ithub.com/mvallim/java-fluent-validator.git</connection>
		<developerConnection>scm:git:https://github.com/mvallim/java-fluent-validator.git</developerConnection>
		<tag>v1.10.1</tag>
	</scm>

	<name>java-fluent-validator</name>
	<description>A Java validation framework leveraging fluent interface style.</description>
	<url>https://github.com/mvallim/java-fluent-validator</url>
	<inceptionYear>2019</inceptionYear>

	<organization>
		<name>com.github.mvallim</name>
		<url>https://github.com/mvallim</url>
	</organization>

	<developers>
		<developer>
			<name>Marcos Tischer Vallim</name>
			<email>tischer@gmail.com</email>
			<timezone>-3</timezone>
		</developer>
		<developer>
			<name>Paulo Sergio</name>
			<email>paulosergio.jnr@gmail.com</email>
			<timezone>-3</timezone>
		</developer>
	</developers>

	<licenses>
		<license>
			<name>Apache 2</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
			<comments>A business-friendly OSS license</comments>
		</license>
	</licenses>

	<build>
		<resources>
			<resource>
				<directory>${project.basedir}</directory>
				<includes>
					<include>NOTICE*</include>
					<include>LICENSE*</include>
				</includes>
			</resource>
		</resources>

		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-clean-plugin</artifactId>
					<version>${maven-clean-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>${maven-compiler-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-deploy-plugin</artifactId>
					<version>${maven-deploy-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-install-plugin</artifactId>
					<version>${maven-install-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-release-plugin</artifactId>
					<version>${maven-release-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-resources-plugin</artifactId>
					<version>${maven-resources-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>${maven-source-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>${maven-surefire-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>${maven-javadoc-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-gpg-plugin</artifactId>
					<version>${maven-gpg-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.jacoco</groupId>
					<artifactId>jacoco-maven-plugin</artifactId>
					<version>${jacoco-maven-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.sonarsource.scanner.maven</groupId>
					<artifactId>sonar-maven-plugin</artifactId>
					<version>${sonar-maven-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.sonatype.central</groupId>
					<artifactId>central-publishing-maven-plugin</artifactId>
					<version>${central-publishing-maven-plugin.version}</version>
				</plugin>
			</plugins>
		</pluginManagement>

		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-clean-plugin</artifactId>
				<inherited>true</inherited>
			</plugin>
			
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-deploy-plugin</artifactId>
				<inherited>true</inherited>
			</plugin>
			
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-install-plugin</artifactId>
				<inherited>true</inherited>
			</plugin>
			
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<configuration>
					<encoding>${project.build.sourceEncoding}</encoding>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<argLine>${jacoco.argLine} -Dfile.encoding=${project.build.sourceEncoding} -Xms1024m -Xmx1024m</argLine>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<configuration>
					<formats>
						<format>XML</format>
					</formats>
					<excludes>
						<exclude>**/test/**</exclude>
						<exclude>**/ValidationExceptionAdvice**</exclude>
					</excludes>
				</configuration>
				<executions>
					<execution>
						<id>prepare-agent</id>
						<phase>test-compile</phase>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
						<configuration>
							<propertyName>jacoco.argLine</propertyName>
						</configuration>
					</execution>
					<execution>
						<id>report</id>
						<phase>test</phase>
						<goals>
							<goal>report</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>${java.version}</source>
					<target>${java.version}</target>
					<encoding>${project.build.sourceEncoding}</encoding>
					<debug>true</debug>
					<showDeprecation>true</showDeprecation>
					<showWarnings>true</showWarnings>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<dependencies>
		<!-- Scope Test -->
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-engine</artifactId>
			<version>${junit.jupiter.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-api</artifactId>
			<version>${junit.jupiter.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest</artifactId>
			<version>${hamcrest.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>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<version>${mockito.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.awaitility</groupId>
			<artifactId>awaitility</artifactId>
			<version>${awaitility.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
			<version>5.3.39</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-test</artifactId>
			<version>5.3.39</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
			<version>${logback.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-core</artifactId>
			<version>${logback.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.assertj</groupId>
			<artifactId>assertj-core</artifactId>
			<version>${assertj-core.version}</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<profiles>
		<profile>
			<id>8</id>
			<activation>
				<jdk>1.8</jdk>
			</activation>
			<properties>
				<java.version>8</java.version>
			</properties>
		</profile>

		<profile>
			<id>11</id>
			<activation>
				<jdk>11</jdk>
			</activation>
			<properties>
				<java.version>11</java.version>
			</properties>
		</profile>

		<profile>
			<id>17</id>
			<activation>
				<jdk>17</jdk>
			</activation>
			<properties>
				<java.version>17</java.version>
			</properties>
		</profile>

		<profile>
			<id>21</id>
			<activation>
				<jdk>21</jdk>
			</activation>
			<properties>
				<java.version>21</java.version>
			</properties>
		</profile>

		<profile>
			<id>sonar</id>
			<properties>
				<sonar.organization>mvallim</sonar.organization>
				<sonar.host.url>https://sonarcloud.io</sonar.host.url>
				<sonar.token>${env.SONAR_TOKEN}</sonar.token>
				<sonar.projectKey>${project.artifactId}</sonar.projectKey>
				<sonar.projectName>${project.artifactId}</sonar.projectName>
				<sonar.projectVersion>${project.version}</sonar.projectVersion>
				<sonar.projectBaseDir>.</sonar.projectBaseDir>
				<sonar.coverage.jacoco.xmlReportPaths>target/site/**/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
				<sonar.sources>src/main/java</sonar.sources>
				<sonar.tests>src/test/java</sonar.tests>
				<sonar.inclusions>src/main/**</sonar.inclusions>
				<sonar.exclusions>src/test/**</sonar.exclusions>
				<sonar.sourceEncoding>${maven.compile.encoding}</sonar.sourceEncoding>
				<sonar.scm.exclusions.disabled>false</sonar.scm.exclusions.disabled>
				<sonar.coverage.exclusions>
					**/model/**,
					**/package-info.**,
					**/generated-sources/**,
					**/generated-test-sources/**,
					**/test/**
				</sonar.coverage.exclusions>
			</properties>
			<activation>
				<activeByDefault>false</activeByDefault>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.sonarsource.scanner.maven</groupId>
						<artifactId>sonar-maven-plugin</artifactId>
						<executions>
							<execution>
								<phase>verify</phase>
								<goals>
									<goal>sonar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>snapshot</id>
			<properties>
				<java.version>8</java.version>
				<maven.test.skip>true</maven.test.skip>
			</properties>
			<distributionManagement>
				<snapshotRepository>
					<id>sonatype-central</id>
					<layout>default</layout>
					<url>https://central.sonatype.com/repository/maven-snapshots/</url>
				</snapshotRepository>
			</distributionManagement>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<goal>jar-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>release</id>
			<properties>
				<java.version>8</java.version>
				<maven.test.skip>true</maven.test.skip>
			</properties>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-release-plugin</artifactId>
						<configuration>
							<autoVersionSubmodules>true</autoVersionSubmodules>
							<useReleaseProfile>false</useReleaseProfile>
							<pushChanges>false</pushChanges>
							<releaseVersion>${env.RELEASE_VERSION}</releaseVersion>
							<tag>${env.RELEASE_TAG}</tag>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.sonatype.central</groupId>
						<artifactId>central-publishing-maven-plugin</artifactId>
						<extensions>true</extensions>
						<configuration>
							<publishingServerId>sonatype-central</publishingServerId>
							<autoPublish>false</autoPublish>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<goal>jar-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
