<?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>cz.geek</groupId>
	<artifactId>geek-parent</artifactId>
	<version>1.0.0</version>
	<packaging>pom</packaging>

	<name>Geek OSS Parent</name>
	<url>http://central.sonatype.org/pages/ossrh-guide.html</url>
	<description>Helps open source Maven projects to be released into the public Central repository</description>

	<properties>
		<targetJdk>1.8</targetJdk>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<sonatypeOssDistMgmtSnapshotsUrl>https://oss.sonatype.org/content/repositories/snapshots/
		</sonatypeOssDistMgmtSnapshotsUrl>
		<maven.build.timestamp.format>yyyy</maven.build.timestamp.format>
		<currentYear>${maven.build.timestamp}</currentYear>
		<arguments />
		<minimal.required.maven.version>3.0.3</minimal.required.maven.version>
		<failOnUndeclaredDependencies>true</failOnUndeclaredDependencies>
	</properties>

	<scm>
		<connection>scm:git:git@github.com:martiner/geek-parent.git</connection>
		<developerConnection>scm:git:git@github.com:martiner/geek-parent.git</developerConnection>
		<url>https://github.com/martiner/geek-parent</url>
		<tag>geek-parent-1.0.0</tag>
	</scm>

	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>Martin Caslavsky</name>
		</developer>
	</developers>

	<repositories>
		<repository>
			<id>sonatype-nexus-snapshots</id>
			<name>Sonatype Nexus Snapshots</name>
			<url>${sonatypeOssDistMgmtSnapshotsUrl}</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</repository>
	</repositories>

	<distributionManagement>
		<snapshotRepository>
			<id>sonatype-nexus-snapshots</id>
			<name>Sonatype Nexus Snapshots</name>
			<url>${sonatypeOssDistMgmtSnapshotsUrl}</url>
		</snapshotRepository>
		<repository>
			<id>sonatype-nexus-staging</id>
			<name>Sonatype Nexus Release Repository</name>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>

	<build>
		<plugins>
			<plugin>
				<!-- use "-Denforcer.skip=true" if you need to build with unstable changes during development -->
				<artifactId>maven-enforcer-plugin</artifactId>
				<executions>
					<execution>
						<id>enforce-maven</id>
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
							<rules>
								<requireJavaVersion>
									<version>${targetJdk}</version>
								</requireJavaVersion>
								<requireMavenVersion>
									<version>${minimal.required.maven.version}</version>
								</requireMavenVersion>
							</rules>
							<fail>true</fail>
							<failFast>true</failFast>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>${targetJdk}</source>
					<target>${targetJdk}</target>
					<showDeprecation>true</showDeprecation>
					<showWarnings>true</showWarnings>
					<fork>true</fork>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<execution>
						<id>analyze</id>
						<goals>
							<goal>analyze-only</goal>
						</goals>
						<configuration>
							<failOnWarning>${failOnUndeclaredDependencies}</failOnWarning>
							<ignoreNonCompile>true</ignoreNonCompile>
							<ignoredUnusedDeclaredDependencies>
								<dependency>:::</dependency>
							</ignoredUnusedDeclaredDependencies>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-javadoc-plugin</artifactId>
				<configuration>
					<!-- Setting more lax JavaDoc lint. See http://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html-->
					<additionalparam>-Xdoclint:none</additionalparam>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<extensions>true</extensions>
				<configuration>
					<serverId>sonatype-nexus-staging</serverId>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
					<autoReleaseAfterClose>true</autoReleaseAfterClose>
				</configuration>
			</plugin>
		</plugins>

		<pluginManagement>
			<!-- Using fixed plugin versions because of build's backward compatibility -->
			<plugins>
				<plugin>
					<artifactId>maven-release-plugin</artifactId>
					<version>2.5.3</version>
					<dependencies>
						<dependency>
							<groupId>org.apache.maven.scm</groupId>
							<artifactId>maven-scm-api</artifactId>
							<version>1.9.1</version>
						</dependency>
						<dependency>
							<groupId>org.apache.maven.scm</groupId>
							<artifactId>maven-scm-providers-standard</artifactId>
							<version>1.9.1</version>
							<type>pom</type>
						</dependency>
					</dependencies>
					<configuration>
						<mavenExecutorId>forked-path</mavenExecutorId>
						<useReleaseProfile>false</useReleaseProfile>
						<arguments>${arguments} -Psonatype-oss-release</arguments>
					</configuration>
				</plugin>
				<plugin>
					<artifactId>maven-clean-plugin</artifactId>
					<version>3.0.0</version>
				</plugin>
				<plugin>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.6.1</version>
				</plugin>
				<plugin>
					<artifactId>maven-jar-plugin</artifactId>
					<version>3.0.2</version>
				</plugin>
				<plugin>
					<artifactId>maven-assembly-plugin</artifactId>
					<version>3.0.0</version>
				</plugin>
				<plugin>
					<artifactId>maven-dependency-plugin</artifactId>
					<version>3.0.0</version>
				</plugin>
				<plugin>
					<artifactId>maven-install-plugin</artifactId>
					<version>2.3.1</version>
				</plugin>
				<plugin>
					<artifactId>maven-site-plugin</artifactId>
					<version>3.6</version>
				</plugin>
				<plugin>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>2.17</version>
				</plugin>
				<plugin>
					<artifactId>maven-deploy-plugin</artifactId>
					<version>2.6</version>
				</plugin>
				<plugin>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>2.10.4</version>
				</plugin>
				<plugin>
					<artifactId>maven-source-plugin</artifactId>
					<version>3.0.1</version>
				</plugin>
				<plugin>
					<artifactId>maven-failsafe-plugin</artifactId>
					<version>2.9</version>
					<executions>
						<execution>
							<goals>
								<goal>integration-test</goal>
								<goal>verify</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<artifactId>maven-gpg-plugin</artifactId>
					<version>1.6</version>
				</plugin>
				<plugin>
					<artifactId>maven-enforcer-plugin</artifactId>
					<version>1.2</version>
				</plugin>
				<plugin>
					<groupId>org.sonatype.plugins</groupId>
					<artifactId>nexus-staging-maven-plugin</artifactId>
					<version>1.6.7</version>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<profiles>
		<profile>
			<id>sonatype-oss-release</id>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-source-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<goal>jar-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<artifactId>maven-javadoc-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<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>

