<?xml version="1.0" encoding="UTF-8"?>
<!--
	Copyright 2014 Black Pepper Software

	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/maven-v4_0_0.xsd">

	<modelVersion>4.0.0</modelVersion>
	<groupId>uk.co.blackpepper</groupId>
	<artifactId>bp-build</artifactId>
	<version>1.2.0</version>
	
	<name>Black Pepper Build</name>
	<description>Build resources for Black Pepper projects.</description>
	<url>https://github.com/BlackPepperSoftware/bp-build</url>
	<inceptionYear>2014</inceptionYear>

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

	<organization>
		<name>Black Pepper Software</name>
		<url>http://www.blackpepper.co.uk/</url>
	</organization>
	
	<developers>
	
		<developer>
			<id>mark.hobson</id>
			<name>Mark Hobson</name>
			<email>mark.hobson@blackpepper.co.uk</email>
			<organization>Black Pepper Software</organization>
			<organizationUrl>http://www.blackpepper.co.uk/</organizationUrl>
		</developer>
		
	</developers>

	<issueManagement>
		<system>GitHub</system>
		<url>https://github.com/BlackPepperSoftware/bp-build/issues</url>
	</issueManagement>
	
	<ciManagement>
		<system>Travis CI</system>
		<url>https://travis-ci.org/BlackPepperSoftware/bp-build</url>
	</ciManagement>
	
	<scm>
		<connection>scm:git:git@github.com:BlackPepperSoftware/bp-build.git</connection>
		<developerConnection>scm:git:git@github.com:BlackPepperSoftware/bp-build.git</developerConnection>
		<tag>1.2.0</tag>
		<url>https://github.com/BlackPepperSoftware/bp-build</url>
	</scm>
	
	<properties>
	
		<!-- Encoding -->
		
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		
	</properties>
		
	<build>
	
		<pluginManagement>
		
			<plugins>
			
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-clean-plugin</artifactId>
					<version>2.5</version>
				</plugin>
				
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<!-- TODO: upgrade when MCOMPILER-205 fixed -->
					<version>2.5.1</version>
					<configuration>
						<source>1.7</source>
						<target>1.7</target>
					</configuration>
				</plugin>
				
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-deploy-plugin</artifactId>
					<version>2.7</version>
				</plugin>
				
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-enforcer-plugin</artifactId>
					<version>1.3.1</version>
				</plugin>
				
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-gpg-plugin</artifactId>
					<version>1.6</version>
				</plugin>
				
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-install-plugin</artifactId>
					<version>2.4</version>
				</plugin>
				
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>2.4</version>
				</plugin>
				
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>2.9</version>
				</plugin>
				
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-release-plugin</artifactId>
					<version>2.5</version>
					<configuration>
						<tagNameFormat>@{project.version}</tagNameFormat>
					</configuration>
				</plugin>
				
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-resources-plugin</artifactId>
					<version>2.6</version>
				</plugin>
				
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-site-plugin</artifactId>
					<version>3.3</version>
				</plugin>
				
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>2.2.1</version>
				</plugin>
				
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>2.15</version>
				</plugin>

				<plugin>
					<groupId>org.sonatype.plugins</groupId>
					<artifactId>nexus-staging-maven-plugin</artifactId>
					<version>1.6.6</version>
					<configuration>
						<serverId>sonatype-nexus-staging</serverId>
						<nexusUrl>https://oss.sonatype.org/</nexusUrl>
						<autoReleaseAfterClose>true</autoReleaseAfterClose>
					</configuration>
				</plugin>

			</plugins>
		
		</pluginManagement>
		
		<plugins>
		
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-enforcer-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
							<rules>
								<requireJavaVersion>
									<version>1.7.0-45</version>
								</requireJavaVersion>
								<requireMavenVersion>
									<version>3.1.1</version>
								</requireMavenVersion>
								<requireNoRepositories />
								<requirePluginVersions />
							</rules>
						</configuration>
					</execution>
				</executions>
			</plugin>
			
			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<extensions>true</extensions>
			</plugin>
			
		</plugins>
	
	</build>
	
	<profiles>
	
		<profile>
			<id>release</id>
			<activation>
				<property>
					<name>performRelease</name>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<executions>
							<execution>
								<id>sign</id>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		
	</profiles>
	
	<distributionManagement>
	
		<repository>
			<id>sonatype-nexus-staging</id>
			<name>Sonatype Nexus Staging Repository</name>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	
		<snapshotRepository>
			<id>sonatype-nexus-snapshots</id>
			<name>Sonatype Nexus Snapshot Repository</name>
			<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
		</snapshotRepository>
	
	</distributionManagement>
	
</project>
