<?xml version="1.0" encoding="UTF-8"?>
<!--
   Copyright 2012–2016 Michael Osipov

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
-->
<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>net.sf.michael-o</groupId>
	<artifactId>michael-o-parent</artifactId>
	<version>9</version>
	<packaging>pom</packaging>

	<name>Michael Osipov's SourceForge.net Parent POM</name>
	<description>Parent POM for all projects created by Michael Osipov at SourceForge.net</description>
	<url>http://sourceforge.net/u/michael-o/profile</url>
	<inceptionYear>2012</inceptionYear>
	<organization>
		<name>Michael Osipov</name>
		<url>http://sourceforge.net/u/michael-o/profile</url>
	</organization>
	<licenses>
		<license>
			<name>Apache License, Version 2.0</name>
			<url>LICENSE.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<developers>
		<developer>
			<id>michael-o</id>
			<name>Michael Osipov</name>
			<email>michael-o@users.sf.net</email>
			<url>http://sourceforge.net/u/michael-o/profile</url>
			<timezone>Europe/Berlin</timezone>
		</developer>
	</developers>

	<prerequisites>
		<maven>${maven.version}</maven>
	</prerequisites>

	<scm>
		<connection>scm:svn:http://svn.code.sf.net/u/michael-o/parent-pom/tags/9</connection>
		<developerConnection>scm:svn:https://svn.code.sf.net/u/michael-o/parent-pom/tags/9</developerConnection>
		<url>http://sourceforge.net/u/michael-o/parent-pom/HEAD/tree/tags/9</url>
	</scm>
	<distributionManagement>
		<snapshotRepository>
			<id>sonatype-nexus-snapshots</id>
			<name>Sonatype Nexus Snapshots</name>
			<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
		</snapshotRepository>
		<repository>
			<id>sonatype-nexus-staging</id>
			<name>Nexus Release Repository</name>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

		<maven.compiler.source>1.6</maven.compiler.source>
		<maven.compiler.target>1.6</maven.compiler.target>

		<maven.version>3.0.5</maven.version>
		<surefire.version>2.19.1</surefire.version>
		<javadoc.version>2.10.3</javadoc.version>

		<manifest.builtBy>${project.developers[0].name} (${project.developers[0].id})</manifest.builtBy>
	</properties>

	<build>
		<extensions>
			<extension>
				<groupId>org.apache.maven.wagon</groupId>
				<artifactId>wagon-ssh</artifactId>
				<version>2.10</version>
			</extension>
		</extensions>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
			</resource>
			<resource>
				<directory>${basedir}</directory>
				<targetPath>META-INF</targetPath>
				<includes>
					<include>LICENSE.txt</include>
				</includes>
			</resource>
		</resources>
		<pluginManagement>
			<plugins>
				<plugin>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.5.1</version>
					<!-- Must be set explicitly due to https://issues.apache.org/jira/browse/MJAVADOC-310 -->
					<configuration>
						<source>${maven.compiler.source}</source>
						<target>${maven.compiler.target}</target>
					</configuration>
				</plugin>
				<plugin>
					<artifactId>maven-source-plugin</artifactId>
					<version>3.0.0</version>
					<configuration>
						<archive>
							<manifest>
								<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
							</manifest>
							<manifestEntries>
								<Built-By>${manifest.builtBy}</Built-By>
							</manifestEntries>
						</archive>
					</configuration>
				</plugin>
				<plugin>
					<artifactId>maven-jar-plugin</artifactId>
					<version>2.6</version>
					<configuration>
						<archive>
							<manifest>
								<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
							</manifest>
							<manifestEntries>
								<Built-By>${manifest.builtBy}</Built-By>
								<X-Compile-Source-JDK>${maven.compiler.source}</X-Compile-Source-JDK>
								<X-Compile-Target-JDK>${maven.compiler.target}</X-Compile-Target-JDK>
							</manifestEntries>
						</archive>
					</configuration>
				</plugin>
				<plugin>
					<artifactId>maven-assembly-plugin</artifactId>
					<version>2.6</version>
				</plugin>
				<plugin>
					<artifactId>maven-release-plugin</artifactId>
					<version>2.5.3</version>
					<configuration>
						<mavenExecutorId>forked-path</mavenExecutorId>
						<useReleaseProfile>false</useReleaseProfile>
						<tagNameFormat>@{project.version}</tagNameFormat>
						<arguments>-Pmichael-o-release,sourceforge-release</arguments>
					</configuration>
				</plugin>
				<plugin>
					<artifactId>maven-deploy-plugin</artifactId>
					<version>2.8.2</version>
				</plugin>
				<plugin>
					<artifactId>maven-help-plugin</artifactId>
					<version>2.2</version>
				</plugin>
				<plugin>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>${javadoc.version}</version>
					<configuration>
						<archive>
							<manifest>
								<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
							</manifest>
							<manifestEntries>
								<!-- Must be manually added due to http://jira.codehaus.org/browse/MSHARED-270 -->
								<Implementation-URL>${project.url}</Implementation-URL>
								<Built-By>${manifest.builtBy}</Built-By>
							</manifestEntries>
						</archive>
						<quiet>true</quiet>
					</configuration>
				</plugin>
				<plugin>
					<artifactId>maven-resources-plugin</artifactId>
					<version>2.7</version>
				</plugin>
				<plugin>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>${surefire.version}</version>
				</plugin>
				<plugin>
					<artifactId>maven-war-plugin</artifactId>
					<version>2.6</version>
				</plugin>
				<plugin>
					<artifactId>maven-install-plugin</artifactId>
					<version>2.5.2</version>
				</plugin>
				<plugin>
					<artifactId>maven-dependency-plugin</artifactId>
					<version>2.10</version>
				</plugin>
				<plugin>
					<artifactId>maven-clean-plugin</artifactId>
					<version>3.0.0</version>
				</plugin>
				<plugin>
					<artifactId>maven-site-plugin</artifactId>
					<version>3.5</version>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>buildnumber-maven-plugin</artifactId>
					<version>1.4</version>
					<configuration>
						<buildNumberPropertyName>buildRevision</buildNumberPropertyName>
						<timestampPropertyName>buildTimestamp</timestampPropertyName>
						<scmBranchPropertyName>buildScmBranch</scmBranchPropertyName>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>versions-maven-plugin</artifactId>
					<version>2.2</version>
					<configuration>
						<generateBackupPoms>false</generateBackupPoms>
					</configuration>
				</plugin>
				<plugin>
					<artifactId>maven-gpg-plugin</artifactId>
					<version>1.6</version>
				</plugin>
				<!-- This plugin has a nasty bug: https://jira.codehaus.org/browse/MSHADE-95
					It completely brakes the release process! Using a locally patched version. -->
				<plugin>
					<artifactId>maven-shade-plugin</artifactId>
					<version>2.4.3</version>
				</plugin>
				<plugin>
					<artifactId>maven-antrun-plugin</artifactId>
					<version>1.8</version>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>wagon-maven-plugin</artifactId>
					<version>1.0</version>
				</plugin>
				<plugin>
					<artifactId>maven-enforcer-plugin</artifactId>
					<version>1.4.1</version>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<artifactId>maven-enforcer-plugin</artifactId>
				<executions>
					<execution>
						<id>enforce-maven</id>
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
							<rules>
								<requireMavenVersion>
									<version>${maven.version}</version>
									<message>This project requires at least Maven ${maven.version}</message>
								</requireMavenVersion>
							</rules>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-site-plugin</artifactId>
				<executions>
					<execution>
						<id>attach-descriptor</id>
						<goals>
							<goal>attach-descriptor</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<executions>
					<execution>
						<id>bundle-site-resources</id>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
						<inherited>false</inherited>
						<configuration>
							<descriptors>
								<descriptor>src/assembly/site-resources.xml</descriptor>
							</descriptors>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<reporting>
		<plugins>
			<plugin>
				<artifactId>maven-project-info-reports-plugin</artifactId>
				<version>2.9</version>
				<reportSets>
					<reportSet>
						<reports>
							<report>summary</report>
							<report>project-team</report>
							<report>license</report>
							<report>scm</report>
							<report>mailing-list</report>
							<report>issue-tracking</report>
							<report>dependencies</report>
							<report>dependency-info</report>
						</reports>
					</reportSet>
				</reportSets>
			</plugin>
			<plugin>
				<artifactId>maven-jxr-plugin</artifactId>
				<version>2.5</version>
			</plugin>
			<plugin>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>${javadoc.version}</version>
				<configuration>
					<quiet>true</quiet>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-pmd-plugin</artifactId>
				<version>3.6</version>
				<configuration>
					<targetJdk>${maven.compiler.target}</targetJdk>
				</configuration>
			</plugin>
			<!-- Attention, Java 7 required here! -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>findbugs-maven-plugin</artifactId>
				<version>3.0.3</version>
			</plugin>
			<plugin>
				<artifactId>maven-surefire-report-plugin</artifactId>
				<version>${surefire.version}</version>
				<configuration>
					<alwaysGenerateSurefireReport>false</alwaysGenerateSurefireReport>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-changes-plugin</artifactId>
				<version>2.11</version>
				<reportSets>
					<reportSet>
						<reports>
							<report>changes-report</report>
						</reports>
					</reportSet>
				</reportSets>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>cobertura-maven-plugin</artifactId>
				<version>2.7</version>
			</plugin>
		</plugins>
	</reporting>

	<profiles>
		<profile>
			<id>michael-o-release</id>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-resources-plugin</artifactId>
						<executions>
							<execution>
								<id>javadoc-resources</id>
								<phase>generate-resources</phase>
								<goals>
									<goal>copy-resources</goal>
								</goals>
								<configuration>
									<outputDirectory>${project.build.directory}/apidocs</outputDirectory>
									<resources>
										<resource>
											<directory>${basedir}</directory>
											<targetPath>META-INF</targetPath>
											<includes>
												<include>LICENSE.txt</include>
											</includes>
										</resource>
									</resources>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<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>
					<plugin>
						<artifactId>maven-deploy-plugin</artifactId>
						<configuration>
							<updateReleaseInfo>true</updateReleaseInfo>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		<!-- This profile is a placeholder. It avoids the duplication of
			the Maven Release Plugin configuration. -->
		<profile>
			<id>sourceforge-release</id>
		</profile>
	</profiles>
</project>
