<?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.g2forge.alexandria</groupId>
	<artifactId>ax-root</artifactId>
	<version>0.0.18</version>
	<packaging>pom</packaging>

	<properties>
		<encoding>UTF-8</encoding>
		<project.build.sourceEncoding>${encoding}</project.build.sourceEncoding>
		<project.reporting.outputEncoding>${encoding}</project.reporting.outputEncoding>
		<project.resources.sourceEncoding>${encoding}</project.resources.sourceEncoding>
		<archetype.encoding>${encoding}</archetype.encoding>

		<mavencompiler.version>3.8.1</mavencompiler.version>
		<mavencompiler.javaversion>11</mavencompiler.javaversion>
		<mavenjar.version>3.1.2</mavenjar.version>
		<mavensurefire.version>3.0.0-M5</mavensurefire.version>
		<mavenfailsafe.version>3.0.0-M5</mavenfailsafe.version>
		<mavenresources.version>3.2.0</mavenresources.version>
		<mavenassembly.version>3.3.0</mavenassembly.version>

		<lombok.version>1.18.18</lombok.version>
		<lombok-maven.version>${lombok.version}.0</lombok-maven.version>
		<slf4j.version>1.7.32</slf4j.version>
		<junit.version>4.13.1</junit.version>
		<hamcrest.version>1.3</hamcrest.version>
		<mockito.version>2.27.0</mockito.version>
		<commons.lang.version>3.4</commons.lang.version>
		<springboot.version>1.4.0.RELEASE</springboot.version>
		<spring.version>4.3.2.RELEASE</spring.version>
		<springsecurity.version>4.1.3.RELEASE</springsecurity.version>
		<jackson.version>2.11.0</jackson.version>
		<jjwt.version>0.4</jjwt.version>
		<jgit.version>5.10.0.202012080955-r</jgit.version>
		<logback.version>1.2.10</logback.version>

		<alexandria.organization>g2forge</alexandria.organization>
		<alexandria.name>Alexandria</alexandria.name>
		<alexandria.repository>alexandria</alexandria.repository>
	</properties>

	<name>Alexandria Root</name>
	<description>Parent project for the critical base code for Alexandria.  Generally one would us "ax-project" instead.</description>
	<url>https://github.com/${alexandria.organization}/${alexandria.repository}/tree/${project.version}/${project.artifactId}</url>
	<developers>
		<developer>
			<name>Greg Gibeling</name>
			<email>gdgib@outlook.com</email>
			<organization>G2Forge</organization>
			<organizationUrl>http://www.g2forge.com</organizationUrl>
		</developer>
	</developers>
	<licenses>
		<license>
			<name>The Apache License, Version 2.0</name>
			<url>https://github.com/${alexandria.organization}/${alexandria.repository}/blob/${project.version}/LICENSE</url>
		</license>
	</licenses>
	<scm>
		<connection>scm:git:git://github.com/${alexandria.organization}/${alexandria.repository}.git</connection>
		<developerConnection>scm:git:ssh://github.com:${alexandria.organization}/${alexandria.repository}.git</developerConnection>
		<url>http://github.com/${alexandria.organization}/${alexandria.repository}/tree/${project.version}</url>
	  <tag>0.0.18</tag>
  </scm>

	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>

	<build>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
			</resource>
			<resource>
				<directory>src/main/java</directory>
				<excludes>
					<exclude>**/*.java</exclude>
				</excludes>
			</resource>
		</resources>
		<testResources>
			<testResource>
				<directory>src/test/resources</directory>
			</testResource>
			<testResource>
				<directory>src/test/java</directory>
				<excludes>
					<exclude>**/*.java</exclude>
				</excludes>
			</testResource>
		</testResources>

		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>${mavencompiler.version}</version>
				<configuration>
					<source>${mavencompiler.javaversion}</source>
					<target>${mavencompiler.javaversion}</target>
					<compilerArgs>
						<arg>-parameters</arg>
						<arg>-Acom.g2forge.alexandria.annotations.note.Note.issueFormat=https://jira.g2forge.com/browse/%1$s</arg>
					</compilerArgs>
					<showWarnings>true</showWarnings>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>${mavensurefire.version}</version>
				<configuration>
					<argLine>
						--illegal-access=permit
					</argLine>
					<parallel>classes</parallel>
					<threadCount>8</threadCount>
					<systemPropertyVariables>
						<com.g2forge.alexandria.wizard.propertiesfile>${project.basedir}/test.properties</com.g2forge.alexandria.wizard.propertiesfile>
					</systemPropertyVariables>
					<trimStackTrace>false</trimStackTrace>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-failsafe-plugin</artifactId>
				<version>${mavenfailsafe.version}</version>
				<configuration>
					<argLine>
						--illegal-access=permit
					</argLine>
					<includes>
						<include>**/Integration*.java</include>
						<include>**/*Integration.java</include>
						<include>**/*IntegrationCase.java</include>
					</includes>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>3.0.0-M1</version>
				<configuration>
					<tagNameFormat>@{project.version}</tagNameFormat>
					<autoVersionSubmodules>true</autoVersionSubmodules>
					<useReleaseProfile>false</useReleaseProfile>
					<releaseProfiles>release</releaseProfiles>
					<goals>deploy</goals>
					<localCheckout>true</localCheckout>
					<pushChanges>false</pushChanges>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<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-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.projectlombok</groupId>
						<artifactId>lombok-maven-plugin</artifactId>
						<version>${lombok-maven.version}</version>
						<executions>
							<execution>
								<phase>generate-sources</phase>
								<goals>
									<goal>delombok</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<addOutputDirectory>false</addOutputDirectory>
							<sourceDirectory>src/main/java</sourceDirectory>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>3.2.0</version>
						<configuration>
							<sourcepath>target/generated-sources/delombok</sourcepath>
						</configuration>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>release-actual</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.6</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>1.6.8</version>
						<extensions>true</extensions>
						<configuration>
							<serverId>ossrh</serverId>
							<nexusUrl>https://oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>false</autoReleaseAfterClose>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>release-snapshot</id>
			<distributionManagement>
				<repository>
					<id>github</id>
					<name>GitHub g2forge Apache Maven Packages</name>
					<url>https://maven.pkg.github.com/g2forge/alexandria</url>
				</repository>
				<snapshotRepository>
					<id>github</id>
					<name>GitHub g2forge Apache Maven Packages</name>
					<url>https://maven.pkg.github.com/g2forge/alexandria</url>
				</snapshotRepository>
			</distributionManagement>
			<repositories>
				<repository>
					<id>github-g2forge</id>
					<url>https://maven.pkg.github.com/g2forge/*</url>
					<releases>
						<enabled>true</enabled>
					</releases>
					<snapshots>
						<enabled>true</enabled>
					</snapshots>
				</repository>
			</repositories>
		</profile>
	</profiles>

	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>${junit.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<version>${lombok.version}</version>
			<scope>provided</scope>
		</dependency>
	</dependencies>
</project>
