<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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>de.mhoffrogge</groupId>
	<artifactId>org-parent</artifactId>
	<version>1</version>
	<packaging>pom</packaging>

	<name>mhoffrogge</name>
	<description>The base parent for all open-source projects coming from mhoffrogge.</description>
	<url>https://github.com/mhoffrog/org-parent</url>
	<inceptionYear>2018</inceptionYear>

	<organization>
		<name>mhoffrogge</name>
		<url>https://github.com/mhoffrog/</url>
	</organization>

	<scm>
		<connection>scm:git:ssh://git@github.com/mhoffrog/org-parent.git</connection>
		<developerConnection>scm:git:ssh://git@github.com/mhoffrog/org-parent.git</developerConnection>
		<url>https://github.com/mhoffrog/org-parent</url>
		<tag>HEAD</tag>
	</scm>

	<issueManagement>
		<system>GitHub</system>
		<url>https://github.com/mhoffrog/org-parent/issues</url>
	</issueManagement>

	<licenses>
		<license>
			<name>MIT License</name>
			<url>http://www.opensource.org/licenses/mit-license.php</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<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>

	<developers>
		<developer>
			<id>Developers</id>
			<url>https://github.com/mhoffrog/org-parent/graphs/contributors</url>
		</developer>
	</developers>

	<properties>
		<project.scm.id>github</project.scm.id>
		<version.maven-gpg-plugin>1.6</version.maven-gpg-plugin>
		<version.maven-javadoc-plugin>2.10.4</version.maven-javadoc-plugin>
		<version.maven-source-plugin>3.0.1</version.maven-source-plugin>
		<version.nexus-staging-maven-plugin>1.6.8</version.nexus-staging-maven-plugin>
		<version.maven-release-plugin>2.5.3</version.maven-release-plugin>
		<version.unleash-maven-plugin>2.9.3</version.unleash-maven-plugin>
		<version.unleash-scm-provider-git>2.2.0</version.unleash-scm-provider-git>
		<skip.attach-sources>false</skip.attach-sources>
		<!-- Overwrite <phase.attach-javadocs> with none or empty value, if attached-javadocs 
			must be skipped -->
		<phase.attach-javadocs>package</phase.attach-javadocs>
	</properties>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>com.itemis.maven.plugins</groupId>
					<artifactId>unleash-maven-plugin</artifactId>
					<version>${version.unleash-maven-plugin}</version>
					<dependencies>
						<dependency>
							<groupId>com.itemis.maven.plugins</groupId>
							<artifactId>unleash-scm-provider-git</artifactId>
							<version>${version.unleash-scm-provider-git}</version>
						</dependency>
					</dependencies>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-release-plugin</artifactId>
					<version>${version.maven-release-plugin}</version>
					<configuration>
						<tagNameFormat>@{project.version}</tagNameFormat>
						<useReleaseProfile>false</useReleaseProfile>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-install-plugin</artifactId>
					<configuration>
						<installAtEnd>true</installAtEnd>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-deploy-plugin</artifactId>
					<configuration>
						<deployAtEnd>true</deployAtEnd>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>${version.maven-source-plugin}</version>
				<configuration>
					<skipSource>${skip.attach-sources}</skipSource>
				</configuration>
				<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>
				<version>${version.maven-javadoc-plugin}</version>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<phase>${phase.attach-javadocs}</phase>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>signing</id>
			<activation>
				<property>
					<name>gpg.keyname</name>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>${version.maven-gpg-plugin}</version>
						<configuration>
							<keyname>${gpg.keyname}</keyname>
							<passphraseServerId>${gpg.keyname}</passphraseServerId>
							<!-- since gpg2, pinentry mode has to be set to loopback for unattended 
								passphrase usage -->
							<gpgArguments>
								<arg>--pinentry-mode</arg>
								<arg>loopback</arg>
							</gpgArguments>
						</configuration>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<!-- This profile is supposed to be explicitly set by commandline -Pstaging -->
			<id>staging</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>${version.nexus-staging-maven-plugin}</version>
						<extensions>true</extensions>
						<configuration>
							<serverId>ossrh</serverId>
							<nexusUrl>https://oss.sonatype.org/</nexusUrl>
							<keepStagingRepositoryOnCloseRuleFailure>true</keepStagingRepositoryOnCloseRuleFailure>
							<autoReleaseAfterClose>true</autoReleaseAfterClose>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>