<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>com.pi4j</groupId>
	<artifactId>pi4j-parent</artifactId>
	<version>0.0.5</version>
	<name>Pi4J :: Parent POM</name>
	<description>Parent Maven POM for the Pi4J Project</description>
	<url>http://www.pi4j.com</url>
	<inceptionYear>2012</inceptionYear>
	<packaging>pom</packaging>

	<!-- ORGANIZATION -->
	<organization>
		<name>Pi4J</name>
		<url>http://www.pi4j.com</url>
	</organization>

	<!-- LICENSE -->
	<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>
			<comments>A business-friendly OSS license</comments>
		</license>
	</licenses>

	<!-- DEVELOPERS/CONTRIBUTORS -->
	<developers>
		<developer>
			<name>Robert Savage</name>
			<email>robert@pi4j.com</email>
			<url>http://robertsavage.me</url>
			<organizationUrl>http://www.savagehomeautomation.com</organizationUrl>
			<roles>
				<role>sponsor</role>
				<role>architect</role>
				<role>developer</role>
			</roles>
		</developer>
		<developer>
			<name>Chris Walzl</name>
			<email>chris@pi4j.com</email>
			<roles>
				<role>sponsor</role>
				<role>developer</role>
			</roles>
		</developer>
	</developers>

	<!-- SOURCE CONTROL -->
	<scm>
		<developerConnection>scm:git:ssh://git@github.com/Pi4J/pi4j.git</developerConnection>
		<connection>scm:git:ssh://git@github.com/Pi4J/pi4j.git</connection>
		<url>https://github.com/Pi4J/pi4j.git</url>
	</scm>

	<!-- ISSUE MANAGEMENT -->
	<issueManagement>
		<url>https://github.com/Pi4J/pi4j/issues</url>
		<system>github</system>
	</issueManagement>

	<!-- DISTRIBUTION REPOSITORIES -->
	<distributionManagement>
		<downloadUrl>http://www.pi4j.com/download.html</downloadUrl>
		<repository>
			<id>sonatype-oss-staging</id>
			<name>Sonatype Open Source Maven Repository</name>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
		</repository>
		<snapshotRepository>
			<id>sonatype-oss-snapshots</id>
			<name>Sonatype Open Source Maven Snapshots Repository</name>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
	</distributionManagement>

	<!-- PROJECT MODULES -->
	<modules>
		<module>pi4j-core</module>
		<module>pi4j-example</module>
		<module>pi4j-service</module>
		<module>pi4j-gpio-extension</module>
		<module>pi4j-device</module>
		<module>pi4j-distribution</module>
	</modules>

	<!-- BUILD PROPERTIES -->
	<properties>

		<!-- DEFAULT RASPBERRY PI PROPERTIES -->
		<pi.host>192.168.1.1</pi.host>
		<pi.port>22</pi.port>
		<pi.user>pi</pi.user>
		<pi.password>raspberry</pi.password>

		<!-- SETTINGS FOR REMOTELY BUILDING NATIVE LIBRARY ON RASPBERRY PI -->
		<pi.dirBuildTemp>/home/pi/pi4j-temp</pi.dirBuildTemp>

		<!-- DEFAULT RASPBERRY PI (HARD-FLOAT) PROPERTIES -->
		<pi.host.hard-float>192.168.1.1</pi.host.hard-float>
		<pi.port.hard-float>${pi.port}</pi.port.hard-float>
		<pi.user.hard-float>${pi.user}</pi.user.hard-float>
		<pi.password.hard-float>${pi.password}</pi.password.hard-float>

		<!-- DEFAULT RASPBERRY PI (SOFT-FLOAT) PROPERTIES -->
		<pi.host.soft-float>192.168.1.2</pi.host.soft-float>
		<pi.port.soft-float>${pi.port}</pi.port.soft-float>
		<pi.user.soft-float>${pi.user}</pi.user.soft-float>
		<pi.password.soft-float>${pi.password}</pi.password.soft-float>

		<!-- SETTINGS FOR COPYING Pi4J ARTIFACTS TO DEVELOPMENT RASPBERRY PI -->
		<pi.transfer.dev>false</pi.transfer.dev>
		<pi.host.dev>${pi.host}</pi.host.dev>
		<pi.port.dev>${pi.port}</pi.port.dev>
		<pi.user.dev>${pi.user}</pi.user.dev>
		<pi.password.dev>${pi.password}</pi.password.dev>
		<pi.dirCopyTo.dev>/home/pi/pi4j-dev</pi.dirCopyTo.dev>

		<!-- PROJECT ENCODING PROPERTIES -->
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

		<!-- GITHUB PROPERTIES -->
		<github.global.server>github</github.global.server>

		<!-- GOOGLE CODE UPLOAD FILE LABEL -->
		<googlecode.upload.label>SNAPSHOT</googlecode.upload.label>

	</properties>

	<!-- BUILD PROFILES -->
	<profiles>
		<!-- USER PROFILE : Robert Savage -->
		<profile>
			<id>savage</id>
			<properties>
				<!-- IP address/Hostname of Raspberry Pi -->
				<pi.host.hard-float>pi-hf-wifi</pi.host.hard-float>
				<pi.host.soft-float>pi-sf-wifi</pi.host.soft-float>
				<pi.host.dev>pi-hf-wifi</pi.host.dev>

				<!-- enable development transfers -->
				<pi.transfer.dev>true</pi.transfer.dev>
			</properties>
			<activation>
				<!-- automatically set user profile based on environment setting -->
				<property>
					<name>env.MAVEN_PROFILE</name>
					<value>savage</value>
				</property>
			</activation>
		</profile>

		<!-- SPECIAL PROFILE TO BUILD JNI NATIVE LIBRARY -->
		<profile>
			<id>native</id>
			<activation>
				<property>
					<name>release-build</name>
				</property>
			</activation>
			<modules>
				<module>pi4j-native</module>
			</modules>
		</profile>

		<!-- SPECIAL PROFILE FOR RELEASE DEPLOYMENT BUILDS -->
		<profile>
			<id>release</id>
			<activation>
				<property>
					<name>release-build</name>
				</property>
			</activation>
			<properties>
				<!-- GOOGLE CODE UPLOAD FILE LABEL -->
				<googlecode.upload.label>RELEASE</googlecode.upload.label>
			</properties>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
								<configuration>
									<keyname>Robert Savage (Pi4J GPG Key) &lt;robert@pi4j.com&gt;</keyname>
								</configuration>
							</execution>
						</executions>
					</plugin>				
				</plugins>
			</build>
			<repositories>
				<repository>
					<id>sonatype-oss-staging</id>
					<name>Sonatype Open Source Maven Repository</name>
					<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
					<releases>
						<enabled>true</enabled>
					</releases>
					<snapshots>
						<enabled>false</enabled>
					</snapshots>
				</repository>
			</repositories>
		</profile>

	</profiles>

	<!-- BUILD INSTRUCTIONS -->
	<build>
		<resources>
			<resource>
				<directory>${basedir}</directory>
				<filtering>false</filtering>
				<includes>
					<include>LICENSE.txt</include>
					<include>NOTICE.txt</include>
					<include>README.md</include>
				</includes>
			</resource>
		</resources>

		<plugins>

			<!-- USE LATEST SCM PLUGIN TO SUPPORT GIT -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-scm-plugin</artifactId>
				<version>1.8.1</version>
				<configuration>
					<goals>install</goals>
				</configuration>
			</plugin>

			<!-- GENERATE LICENSE FILE IN PROJECT ROOT -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>license-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>update-project-license</id>
						<goals>
							<goal>update-project-license</goal>
						</goals>
						<phase>process-sources</phase>
						<configuration>
							<licenseName>apache_v2</licenseName>
							<canUpdateLicense>true</canUpdateLicense>
						</configuration>
					</execution>
					<execution>
						<id>append-license-file-headers</id>
						<configuration>
							<descriptionTemplate>${basedir}/src/license/template.ftl</descriptionTemplate>
							<skip>true</skip>
						</configuration>
					</execution>
				</executions>
				<inherited>false</inherited>
			</plugin>

			<!-- GENERATE SITE DOCUMENTATION -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-site-plugin</artifactId>
				<inherited>false</inherited>
				<configuration>
					<reportPlugins>
						<plugin>
							<groupId>org.apache.maven.plugins</groupId>
							<artifactId>maven-javadoc-plugin</artifactId>
							<version>2.8</version>
							<reportSets>
								<reportSet>
									<id>non-aggregate</id>
									<configuration>
										<verbose>true</verbose>
										<linksource>true</linksource>
										<name>JavaDocs</name>
										<description>JavaDoc API documentation</description>
										<outputName>javadoc/index</outputName>
										<sourcepath>pi4j-core/src/main/java</sourcepath>
									</configuration>
									<reports>
										<report>javadoc</report>
									</reports>
								</reportSet>
							</reportSets>
						</plugin>
						<plugin>
							<groupId>org.apache.maven.plugins</groupId>
							<artifactId>maven-project-info-reports-plugin</artifactId>
							<version>2.5.1</version>
							<reportSets>
								<reportSet>
									<reports>
										<report>summary</report>
										<report>project-team</report>
										<report>license</report>
										<report>scm</report>
										<report>issue-tracking</report>
										<report>plugins</report>
										<report>dependency-info</report>
										<report>dependency-management</report>
										<report>plugin-management</report>
										<report>distribution-management</report>
									</reports>
								</reportSet>
							</reportSets>
						</plugin>
						<plugin>
							<groupId>org.codehaus.mojo</groupId>
							<artifactId>taglist-maven-plugin</artifactId>
							<version>2.4</version>
						</plugin>
						<plugin>
							<groupId>org.apache.maven.plugins</groupId>
							<artifactId>maven-surefire-report-plugin</artifactId>
							<version>2.12.3</version>
						</plugin>
						<plugin>
							<groupId>org.apache.maven.plugins</groupId>
							<artifactId>maven-pmd-plugin</artifactId>
							<version>2.7.1</version>
						</plugin>
						<plugin>
							<groupId>org.apache.maven.plugins</groupId>
							<artifactId>maven-jxr-plugin</artifactId>
							<version>2.3</version>
						</plugin>
						<plugin>
							<groupId>org.apache.maven.plugins</groupId>
							<artifactId>maven-checkstyle-plugin</artifactId>
							<version>2.9.1</version>
						</plugin>
					</reportPlugins>
				</configuration>
			</plugin>

			<!-- DEPLOY GITHUB SITE DOCUMENTATION -->
			<plugin>
				<groupId>com.github.github</groupId>
				<artifactId>site-maven-plugin</artifactId>
				<version>0.7</version>
				<inherited>false</inherited>
				<configuration>
					<repositoryOwner>Pi4J</repositoryOwner>
					<repositoryName>pi4j</repositoryName>
					<message>Generating site content for ${project.version}</message>
				</configuration>
			</plugin>

			<!-- ATTACH LICENSE AS ARTIFACT -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>attach-artifacts</id>
						<phase>package</phase>
						<goals>
							<goal>attach-artifact</goal>
						</goals>
						<configuration>
							<artifacts>
								<artifact>
									<file>${basedir}/LICENSE.txt</file>
									<type>txt</type>
									<classifier>license</classifier>
								</artifact>
								<artifact>
									<file>${basedir}/NOTICE.txt</file>
									<type>txt</type>
									<classifier>notice</classifier>
								</artifact>
								<artifact>
									<file>${basedir}/README.md</file>
									<type>md</type>
									<classifier>readme</classifier>
								</artifact>
							</artifacts>
						</configuration>
					</execution>
				</executions>
				<inherited>false</inherited>
			</plugin>

			<!-- TWEET PROJECT DEPLOYMENT ANNOUNCEMENT -->
			<!-- <plugin> -->
			<!-- <groupId>com.vineetmanohar</groupId> -->
			<!-- <artifactId>maven-twitter-plugin</artifactId> -->
			<!-- <version>0.2</version> -->

			<!-- <executions> -->
			<!-- phase: deploy -->
			<!-- <execution> -->
			<!-- <configuration> -->
			<!-- Tell users that the project is deployed -->
			<!-- <twitterStatus>#Pi4J build ${project.version} has been deployed to 
				the repository.</twitterStatus> -->
			<!-- </configuration> -->
			<!-- <id>deploy</id> -->
			<!-- <phase>deploy</phase> -->
			<!-- <goals> -->
			<!-- <goal>tweet</goal> -->
			<!-- </goals> -->
			<!-- </execution> -->
			<!-- </executions> -->
			<!-- </plugin> -->

		</plugins>

		<pluginManagement>
			<plugins>

				<!-- JAVA COMPILER -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>2.5.1</version>
					<configuration>
						<source>1.7</source>
						<target>1.7</target>
						<showDeprecation>true</showDeprecation>
						<showWarnings>true</showWarnings>
						<verbose>true</verbose>
						<compilerVersion>1.7</compilerVersion>
					</configuration>
				</plugin>

				<!-- INCLUDE SOURCE JAR -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<executions>
						<execution>
							<id>attach-sources</id>
							<goals>
								<goal>jar</goal>
							</goals>
						</execution>
					</executions>
				</plugin>

				<!-- INCLUDE JAVADOC JAR -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<executions>
						<execution>
							<id>attach-javadocs</id>
							<goals>
								<goal>jar</goal>
							</goals>
						</execution>
					</executions>
				</plugin>

				<!-- DOWNLOAD LICENSE, README & NOTICE ARTIFACTS -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-dependency-plugin</artifactId>
					<version>2.5.1</version>
					<executions>
						<execution>
							<id>copy-license</id>
							<phase>validate</phase>
							<goals>
								<goal>copy</goal>
							</goals>
							<configuration>
								<artifactItems>
									<artifactItem>
										<groupId>com.pi4j</groupId>
										<artifactId>pi4j-parent</artifactId>
										<version>${project.version}</version>
										<classifier>license</classifier>
										<type>txt</type>
										<overWrite>true</overWrite>
										<outputDirectory>${project.build.directory}</outputDirectory>
										<destFileName>LICENSE.txt</destFileName>
									</artifactItem>
									<artifactItem>
										<groupId>com.pi4j</groupId>
										<artifactId>pi4j-parent</artifactId>
										<version>${project.version}</version>
										<classifier>notice</classifier>
										<type>txt</type>
										<overWrite>true</overWrite>
										<outputDirectory>${project.build.directory}</outputDirectory>
										<destFileName>NOTICE.txt</destFileName>
									</artifactItem>
									<artifactItem>
										<groupId>com.pi4j</groupId>
										<artifactId>pi4j-parent</artifactId>
										<version>${project.version}</version>
										<classifier>readme</classifier>
										<type>md</type>
										<overWrite>true</overWrite>
										<outputDirectory>${project.build.directory}</outputDirectory>
										<destFileName>README.md</destFileName>
									</artifactItem>
								</artifactItems>
								<outputDirectory>${project.build.directory}</outputDirectory>
								<overWriteReleases>false</overWriteReleases>
								<overWriteSnapshots>true</overWriteSnapshots>
							</configuration>
						</execution>
					</executions>
				</plugin>

				<!-- OSGi BUNDLE -->
				<plugin>
					<groupId>org.apache.felix</groupId>
					<artifactId>maven-bundle-plugin</artifactId>
					<version>2.3.7</version>
					<extensions>true</extensions>
				</plugin>

				<!-- USED TO ATTACH EXTRA ARTIFACTS -->
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>build-helper-maven-plugin</artifactId>
					<version>1.7</version>
				</plugin>

				<plugin>
					<groupId>com.googlecode.maven-gcu-plugin</groupId>
					<artifactId>maven-gcu-plugin</artifactId>
					<version>1.1</version>
				</plugin>

				<!-- GENERATE LICENSE HEADERS IN SOURCE FILES -->
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>license-maven-plugin</artifactId>
					<version>1.3</version>
					<configuration>
						<verbose>false</verbose>
					</configuration>
					<executions>
						<execution>
							<id>append-license-file-headers</id>
							<goals>
								<goal>update-file-header</goal>
							</goals>
							<phase>process-sources</phase>
							<configuration>
								<licenseName>apache_v2</licenseName>
								<descriptionTemplate>${basedir}/../src/license/template.ftl</descriptionTemplate>
								<canUpdateCopyright>true</canUpdateCopyright>
								<canUpdateDescription>true</canUpdateDescription>
								<canUpdateLicense>true</canUpdateLicense>
								<roots>
									<root>src/main/native</root>
									<root>src/main/java</root>
									<root>src/test</root>
								</roots>
							</configuration>
						</execution>
					</executions>
				</plugin>

				<!-- USED TO GENERATE HEADER FILES FOR NATIVE LIBS -->
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>native-maven-plugin</artifactId>
					<version>1.0-alpha-7</version>
				</plugin>

				<!-- GENERATE SITE DOCUMENTATION -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-site-plugin</artifactId>
					<version>3.0</version>
				</plugin>

				<!--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.codehaus.mojo
										</groupId>
										<artifactId>
											license-maven-plugin
										</artifactId>
										<versionRange>
											[1.3,)
										</versionRange>
										<goals>
											<goal>
												update-file-header
											</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>

	</build>

	<!-- PROJECT DEPENDENCIES -->
	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.osgi</groupId>
				<artifactId>org.osgi.core</artifactId>
				<version>4.2.0</version>
			</dependency>
			<dependency>
				<groupId>org.apache.ant</groupId>
				<artifactId>ant-jsch</artifactId>
				<version>1.7.1</version>
			</dependency>
			<dependency>
				<groupId>com.jcraft</groupId>
				<artifactId>jsch</artifactId>
				<version>0.1.42</version>
			</dependency>
			<dependency>
				<groupId>ant-contrib</groupId>
				<artifactId>ant-contrib</artifactId>
				<version>20020829</version>
			</dependency>
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>4.10</version>
				<scope>test</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<!-- MAVEN REPOSITORIES -->
	<repositories>
		<repository>
			<id>oss-snapshots-repo</id>
			<name>Sonatype OSS Maven Repository</name>
			<url>https://oss.sonatype.org/content/groups/public</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</repository>
	</repositories>

</project>