<?xml version="1.0" encoding="UTF-8"?>

<!-- Copyright 2014-2015 Grzegorz Slowikowski (gslowikowski at gmail dot 
	com) 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">

	<parent>
		<groupId>com.deliver8r</groupId>
		<artifactId>deliver8r-parent</artifactId>
		<version>0.0.5</version>
	</parent>

	<modelVersion>4.0.0</modelVersion>
	<artifactId>servicewrapper-maven-plugin</artifactId>
	<version>0.0.6</version>
	<packaging>maven-plugin</packaging>

	<name>Service Wrapper Maven Plugin</name>
	<description>Maven Plugin for building Service Wrappers for Java Applications</description>
	<inceptionYear>2015</inceptionYear>
	<url>${ghpages.url}</url>

	<distributionManagement>
		<site>
			<id>githubd8r</id>
			<name>GitHub Pages</name>
			<url>github:${ghpages.url}/</url>
			<!-- <url>git:ssh:git@github.com/deliver8r/deliver8r-parent.git?gh-pages#</url> -->
		</site>
	</distributionManagement>
	<scm>
		<connection>scm:git:${git.url}</connection>
		<url>scm:git:${git.url}</url>
		<developerConnection>scm:git:${git.url}</developerConnection>
		<tag>servicewrapper-maven-plugin-0.0.6</tag>
	</scm>

	<issueManagement>
		<system>GitHub Issues</system>
		<url>https://github.com/${team.group.id}/${project.artifactId}/issues</url>
	</issueManagement>


	<prerequisites>
		<maven>3.0</maven>
	</prerequisites>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<maven.compiler.jdk.version>1.7</maven.compiler.jdk.version>
		<ghpages.url>http://${team.group.id}.github.io/${project.artifactId}/site/${project.version}</ghpages.url>
		<maven.version>2.2.1</maven.version>
		<maven-plugin-plugin.version>3.3</maven-plugin-plugin.version>
		<redline.version>1.2.1</redline.version>

	</properties>

	<dependencies>
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-artifact</artifactId>
			<version>${maven.version}</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-plugin-api</artifactId>
			<version>${maven.version}</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.maven.plugin-tools</groupId>
			<artifactId>maven-plugin-annotations</artifactId>
			<version>${maven-plugin-plugin.version}</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-project</artifactId>
			<version>${maven.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>tanukisoft</groupId>
			<artifactId>wrapper</artifactId>
			<version>3.5.28</version>
			<classifier>community</classifier>
		</dependency>
	</dependencies>

	<build>
		<pluginManagement>
			<plugins>
				<!--This plugin's configuration is used to store Eclipse m2e settings 
					only. It has no influence on the Maven build itself. -->
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.apache.maven.plugins</groupId>
										<artifactId>maven-enforcer-plugin</artifactId>
										<versionRange>[1.0,)</versionRange>
										<goals>
											<goal>enforce</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>

								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.apache.maven.plugins</groupId>
										<artifactId>maven-plugin-plugin</artifactId>
										<versionRange>[1.0,)</versionRange>
										<goals>
											<goal>descriptor</goal>
											<goal>helpmojo</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>

								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.codehaus.plexus</groupId>
										<artifactId>plexus-maven-plugin</artifactId>
										<versionRange>[1.0,)</versionRange>
										<goals>
											<goal>descriptor</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<configuration>
						<source>1.7</source>
						<target>1.7</target>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-enforcer-plugin</artifactId>
				<executions>
					<execution>
						<id>enforce-maven</id> <!-- don't change this 'id', it overrides one from 'oss-parent' parent -->
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
							<rules>
								<requireMavenVersion>
									<version>2.2.1</version>
									<message>Maven 2.1.1 or later required.</message>
								</requireMavenVersion>
							</rules>
						</configuration>
					</execution>
					<execution>
						<id>enforce-java6</id>
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
							<rules>
								<requireJavaVersion>
									<version>1.6</version>
									<message>Java 1.6 or later required.</message>
								</requireJavaVersion>
							</rules>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<reporting>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-plugin-plugin</artifactId>
				<version>${maven-plugin-plugin.version}</version>
				<configuration>
					<useJava5>true</useJava5>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-project-info-reports-plugin</artifactId>
				<version>2.8</version>
			</plugin>
		</plugins>
	</reporting>

	<profiles>
		<profile>
			<id>maven-3</id>
			<activation>
				<file>
					<!-- This employs that the basedir expression is only recognized by 
						Maven 3.x (see MNG-2363) -->
					<exists>${basedir}</exists>
				</file>
			</activation>

			<build>
				<plugins>
					<plugin>
						<artifactId>maven-site-plugin</artifactId>
						<inherited>false</inherited>
						<executions>
							<execution>
								<id>attach-descriptor</id>
								<goals>
									<goal>attach-descriptor</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>
