<?xml version="1.0" encoding="UTF-8"?>
<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.scoperetail.pom</groupId>
	<artifactId>oss-parent-pom</artifactId>
	<version>2.0</version>
	<packaging>pom</packaging>
	<name>${project.groupId}:${project.artifactId}</name>
	<description>Scoperetail's Parent POM for all Open Source Code</description>
	<url>https://github.com/scoperetail-io/${project.artifactId}</url>
	<licenses>
		<license>
			<name>The MIT License</name>
			<url>https://opensource.org/licenses/MIT</url>
			<distribution>repo</distribution>
		</license>
	</licenses>
	<developers>
		<developer>
			<id>Tushar Agrawal</id>
		</developer>
	</developers>
	<scm>
		<developerConnection>
            scm:git:git@github.com:scoperetail-io/${project.artifactId}.git
        </developerConnection>
		<tag>oss-parent-pom-2.0</tag>
		<url>https://github.com/scoperetail-io/${project.artifactId}</url>
	</scm>
	<repositories>
		<repository>
			<id>maven-central</id>
			<name>maven</name>
			<url>https://repo.maven.apache.org/maven2/</url>
		</repository>
		<repository>
			<id>spring-milestones</id>
			<name>Spring Milestones</name>
			<url>https://repo.spring.io/milestone</url>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
		</repository>
		<repository>
			<id>ossrh</id>
			<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</repository>
	</repositories>

	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>ossrh</id>
			<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>
	<properties>
		<java.version>17</java.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<maven.compiler.source>${java.version}</maven.compiler.source>
		<maven.compiler.target>${java.version}</maven.compiler.target>
		<maven-enforcer-plugin.version>3.1.0</maven-enforcer-plugin.version>
		<!-- SONAR -->
		<sonar.host.url>https://sonarcloud.io</sonar.host.url>
		<sonar.organization>scoperetail-io</sonar.organization>
		<sonar.projectKey>${sonar.organization}_${project.artifactId}</sonar.projectKey>
		<sonar.exclusions>
			com/**/**Test**.java
		</sonar.exclusions>
		<sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
		<sonar.language>java</sonar.language>
		<!-- SONAR -->
		<license-maven-plugin.version>2.0.0</license-maven-plugin.version>
		<maven-compiler-plugin.version>3.10.1</maven-compiler-plugin.version>
		<mapstruct.version>1.5.3.Final</mapstruct.version>
		<lombok.version>1.18.24</lombok.version>

		<maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
		<maven-failsafe-plugin.version>2.22.2</maven-failsafe-plugin.version>
	</properties>
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>${maven-compiler-plugin.version}</version>
				<configuration>
					<release>${java.version}</release>
					<annotationProcessorPaths>
						<path>
							<groupId>org.mapstruct</groupId>
							<artifactId>mapstruct-processor</artifactId>
							<version>${mapstruct.version}</version>
						</path>
						<path>
							<groupId>org.projectlombok</groupId>
							<artifactId>lombok</artifactId>
							<version>${lombok.version}</version>
						</path>
					</annotationProcessorPaths>
					<generatedSourcesDirectory>${project.build.directory}/generated-sources</generatedSourcesDirectory>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-enforcer-plugin</artifactId>
				<version>${maven-enforcer-plugin.version}</version>
				<executions>
					<execution>
						<id>enforce-maven</id>
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
							<rules>
								<requireMavenVersion>
									<version>3.6</version>
								</requireMavenVersion>
							</rules>
						</configuration>
					</execution>
					<execution>
						<id>enforce-java</id>
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
							<rules>
								<requireJavaVersion>
									<version>${java.version}</version>
								</requireJavaVersion>
							</rules>
						</configuration>
					</execution>
					<execution>
						<id>enforce-files-exist</id>
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
							<rules>
								<requireFilesExist>
									<files>
										<file>${project.basedir}/.circleci/.maven.xml</file>
										<file>${project.basedir}/.circleci/config.yml</file>
										<file>${project.basedir}/.gitignore</file>
										<file>${project.basedir}/LICENSE</file>
									</files>
								</requireFilesExist>
							</rules>
							<fail>true</fail>
						</configuration>
					</execution>
					<execution>
						<id>enforce-dont-exist</id>
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
							<rules>
								<requireFilesDontExist>
									<files>
										<file>${project.basedir}/mvnw</file>
										<file>${project.basedir}/mvnw.cmd</file>
										<file>${project.basedir}/.mvn</file>
									</files>
								</requireFilesDontExist>
							</rules>
							<fail>true</fail>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>license-maven-plugin</artifactId>
				<version>${license-maven-plugin.version}</version>
				<executions>
					<execution>
						<id>first</id>
						<goals>
							<goal>update-file-header</goal>
						</goals>
						<phase>process-sources</phase>
					</execution>
				</executions>
				<configuration>
					<verbose>false</verbose>
					<licenseName>mit</licenseName>
					<organizationName>Scope Retail Systems Inc.</organizationName>
					<projectName>${project.name}</projectName>
					<inceptionYear>2018</inceptionYear>
					<processStartTag>*****</processStartTag>
					<sectionDelimiter>-----</sectionDelimiter>
					<processEndTag>=====</processEndTag>
					<roots>
						<root>src/main/java</root>
						<root>src/test/java</root>
					</roots>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<configuration>
					<scmCommentPrefix>[skip ci]</scmCommentPrefix>
				</configuration>
			</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-failsafe-plugin</artifactId>
				<version>${maven-failsafe-plugin.version}</version>
			</plugin>
		</plugins>
	</build>
	<profiles>
		<profile>
			<id>deploy</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<distributionManagement>
				<snapshotRepository>
					<id>ossrh</id>
					<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
				</snapshotRepository>
				<repository>
					<id>ossrh</id>
					<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
				</repository>
			</distributionManagement>

		</profile>
		<profile>
			<id>release</id>
			<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>
	</profiles>
</project>