<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>1.4</version>
	<name>Pi4J :: Parent POM</name>
	<description>Parent Maven POM for the Pi4J Project</description>
	<url>https://pi4j.com</url>
	<inceptionYear>2012</inceptionYear>
	<packaging>pom</packaging>

	<!-- ORGANIZATION -->
	<organization>
		<name>Pi4J</name>
		<url>https://pi4j.com</url>
	</organization>

	<!-- LICENSE -->
	<licenses>
		<license>
			<name>Apache License, Version 2.0</name>
			<url>https://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>
            <timezone>-5</timezone>
		</developer>
		<developer>
			<name>Daniel Sendula</name>
			<email>daniel@pi4j.com</email>
			<roles>
				<role>developer</role>
			</roles>
		</developer>
        <developer>
            <name>Frank Delporte</name>
            <email>frank@pi4j.com</email>
            <url>https://webtechie.be</url>
            <roles>
                <role>facilitator</role>
                <role>developer</role>
            </roles>
            <timezone>+1</timezone>
        </developer>
		<developer>
			<id>eitch</id>
			<name>Robert von Burg</name>
			<email>eitch@eitchnet.ch</email>
			<url>http://strolch.li</url>
			<roles>
				<role>developer</role>
			</roles>
			<timezone>+1</timezone>
		</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>https://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>

	<!-- DEPENDENCY 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 MODULES -->
	<modules>
		<module>pi4j-core</module>
		<module>pi4j-example</module>
		<module>pi4j-distribution</module>
	</modules>

    <!-- PROJECT PREREQUISITES -->
	<prerequisites>
		<maven>3.0.5</maven>
	</prerequisites>

	<!-- BUILD PROPERTIES -->
	<properties>
		<!-- =================================================================== -->
		<!-- SELECT THE PROPER COMPILER OPTION FOR THE NATIVE LIBRARY BUILDS     -->
		<!-- The supported options are:                                          -->
		<!--    "CROSS-COMPILER"  for cross-compiling on your host with a cross  -->
		<!--                      compiler environment setup for 64-bit (aarch64)-->
		<!--                      and 32-bit (armhf) platforms.  The host must   -->
		<!--                      be a Linux-based system with an Intel/AMD or   -->
		<!--                      ARM 64-bit CPU and Operating System.  The host -->
		<!--                      can be a RaspberryPi 3B or 4B that is running  -->
		<!--                      Pi OS 64-bit. (Unable to cross-compile for     -->
		<!--                      64-bit library on 32-bit only hosts.)          -->
		<!--                      [THIS IS THE DEFAULT IF NOT SPECIFIED]         -->
		<!--                                                                     -->
		<!--    "DOCKER-COMPILER" for cross-compiling inside a Docker container  -->
		<!--                      best option when compiling on MacOS or Windows -->
		<!--                      This option is also suitable for a Linux-based -->
		<!--                      system where you would prefer not to install   -->
		<!--                      ARM-based cross-compilers and other build      -->
		<!--                      environment requirements like Java/JDK and     -->
		<!--                      Maven.  This option only requires that you     -->
		<!--                      have Docker (https://www.docker.com/) or       -->
		<!--                      Docker Desktop installed and running on a      -->
		<!--                      64-bit Intel/AMD or ARM host system.           -->
		<!--                                                                     -->
		<!-- (Note: you should override these options in a custom active profile -->
		<!--        in your local M2 settings.xml file or use one of the         -->
		<!--        associated profiles with the '-P' flag.  -->
		<!-- =================================================================== -->

		<!-- YOU CAN DEFINE ONE OF THE FOLLOWING AS A CUSTOM ACTIVE PROFILE
             IN YOUR ~/.m2/settings.xml file TO PERMANENTLY APPLY THE DESIRED
             COMPILER BEHAVIOR -->
		<!-- <pi4j.native.compiler>CROSS-COMPILER</pi4j.native.compiler> -->
		<!-- <pi4j.native.compiler>DOCKER-COMPILER</pi4j.native.compiler> -->

		<!-- OR YOU CAN DEFINE THE PROPERTY VALUE USING THE '-D' FLAG ON YOUR MAVEN COMMAND -->
		<!-- i.e.:   mvn clean install -Pnative -Dpi4j.native.compiler=CROSS-COMPILER -->
		<!-- i.e.:   mvn clean install -Pnative -Dpi4j.native.compiler=DOCKER-COMPILER -->

		<!-- OR YOU CAN DEFINE THE ASSOCIATED PROFILE VALUE USING THE '-P' FLAG ON YOUR MAVEN COMMAND -->
		<!-- i.e.:   mvn clean install -Pnative -Pcross-compile -->
		<!-- i.e.:   mvn clean install -Pnative -Pdocker -->

		<!-- used internally; do not change value here -->
		<!-- BY DEFAULT, ENABLE THE 'CROSS-COMPILER' FOR NATIVE BUILDS -->
		<pi4j.native.compiler.effective>CROSS-COMPILER</pi4j.native.compiler.effective>

		<!-- DEFAULT SETTINGS FOR REMOTELY BUILDING NATIVE LIBRARY ON A REMOTE PLATFORM -->
		<pi4j.default.host>192.168.1.100</pi4j.default.host>
		<pi4j.default.port>22</pi4j.default.port>
		<pi4j.default.user>pi</pi4j.default.user>
		<pi4j.default.password>raspberry</pi4j.default.password>
		<pi4j.default.directory>pi4j-temp</pi4j.default.directory>

		<!-- SETTINGS FOR COPYING Pi4J ARTIFACTS TO DEVELOPMENT DEVICE/PLATFORM -->
		<pi4j.dev.transfer>false</pi4j.dev.transfer>
		<pi4j.dev.host>${pi4j.default.host}</pi4j.dev.host>
		<pi4j.dev.port>${pi4j.default.port}</pi4j.dev.port>
		<pi4j.dev.user>${pi4j.default.user}</pi4j.dev.user>
		<pi4j.dev.password>${pi4j.default.password}</pi4j.dev.password>
		<pi4j.dev.directory>pi4j-dev</pi4j.dev.directory>

		<!-- DEFAULT Pi4J BUILD PROPERTIES FOR THE 'RaspberryPi' PLATFORM -->
		<raspberrypi.build>false</raspberrypi.build>
		<raspberrypi.platform>raspberrypi</raspberrypi.platform>
		<raspberrypi.name>RaspberryPi</raspberrypi.name>
		<raspberrypi.host>${pi4j.default.host}</raspberrypi.host>
		<raspberrypi.port>${pi4j.default.port}</raspberrypi.port>
		<raspberrypi.user>${pi4j.default.user}</raspberrypi.user>
		<raspberrypi.password>${pi4j.default.password}</raspberrypi.password>
		<raspberrypi.directory>${pi4j.default.directory}</raspberrypi.directory>

		<!-- 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>

		<!-- JAVA COMPILER VERSIONS -->
		<java.version>11</java.version>
		<maven.compiler.source>${java.version}</maven.compiler.source>
		<maven.compiler.target>${java.version}</maven.compiler.target>

        <!-- DEPENDENCY VERSIONS -->
        <org.osgi.core.version>6.0.0</org.osgi.core.version>
        <ant-jsch.version>1.9.7</ant-jsch.version>
        <jsch.version>0.1.53</jsch.version>
        <ant-contrib.version>20020829</ant-contrib.version>
        <junit.version>4.13.1</junit.version>
        <mockito.version>3.7.7</mockito.version>
        <powermock.version>2.0.9</powermock.version>
		<jaxb-api.version>2.3.1</jaxb-api.version>
		<apache-velocity.version>1.7</apache-velocity.version>
		<jdeb.version>1.7</jdeb.version>

		<!-- PLUGIN VERSIONS -->
		<maven-jar-plugin.version>3.2.0</maven-jar-plugin.version>
		<maven-dependency-plugin.version>3.1.2</maven-dependency-plugin.version>
		<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
		<maven-source-plugin.version>3.2.0</maven-source-plugin.version>
		<maven-resource-plugin.version>3.2.0</maven-resource-plugin.version>
		<maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.version>
		<maven-replacer-plugin.version>1.4.1</maven-replacer-plugin.version>
		<maven-site-plugin.version>3.9.1</maven-site-plugin.version>
		<maven-assembly-plugin.version>3.3.0</maven-assembly-plugin.version>
		<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
		<maven-scm-plugin.version>1.11.2</maven-scm-plugin.version>
		<maven-bundle-plugin.version>4.2.1</maven-bundle-plugin.version>
		<maven-antrun-plugin.version>3.0.0</maven-antrun-plugin.version> <!-- TODO :: UPDATE PLUGIN TO v3.0.0 -->
		<maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version>
		<maven-failsafe-plugin.version>3.0.0-M5</maven-failsafe-plugin.version>
		<maven-enforcer-plugin.version>3.0.0-M3</maven-enforcer-plugin.version>
		<native-maven-plugin.version>1.0-alpha-9</native-maven-plugin.version>
		<license-maven-plugin.version>2.0.0</license-maven-plugin.version>
		<build-helper-maven-plugin.version>3.2.0</build-helper-maven-plugin.version>
		<exec-maven-plugin.version>3.0.0</exec-maven-plugin.version>
		<s3-upload-maven-plugin.version>1.5</s3-upload-maven-plugin.version>
		<lifecycle-mapping.version>1.0.0</lifecycle-mapping.version>

		<!-- REPORTS VERSIONS -->
		<maven-project-info-reports-plugin.version>2.9</maven-project-info-reports-plugin.version>

		<!-- SPECIAL ACCESS PROPERTIES -->
		<!-- These are only used by project comitters/publishers -->
		<pi4j.aws.access.key></pi4j.aws.access.key>
		<pi4j.aws.secret.key></pi4j.aws.secret.key>
		<pi4j.gpg.sign>false</pi4j.gpg.sign>
		<pi4j.gpg.key></pi4j.gpg.key>
		<pi4j.gpg.keyring></pi4j.gpg.keyring>
		<pi4j.gpg.passphrase></pi4j.gpg.passphrase>
	</properties>

	<!-- PROJECT DEPENDENCIES -->
	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.osgi</groupId>
				<artifactId>org.osgi.core</artifactId>
				<version>${org.osgi.core.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.ant</groupId>
				<artifactId>ant-jsch</artifactId>
				<version>${ant-jsch.version}</version>
			</dependency>
			<dependency>
				<groupId>com.jcraft</groupId>
				<artifactId>jsch</artifactId>
				<version>${jsch.version}</version>
			</dependency>
			<dependency>
				<groupId>ant-contrib</groupId>
				<artifactId>ant-contrib</artifactId>
				<version>${ant-contrib.version}</version>
			</dependency>
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>${junit.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.mockito</groupId>
				<artifactId>mockito-core</artifactId>
				<version>${mockito.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.powermock</groupId>
				<artifactId>powermock-core</artifactId>
				<version>${powermock.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.powermock</groupId>
				<artifactId>powermock-module-junit4</artifactId>
				<version>${powermock.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.powermock</groupId>
				<artifactId>powermock-api-mockito2</artifactId>
				<version>${powermock.version}</version>
				<scope>test</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<!-- GLOBAL DEPENDENCIES -->
	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
		</dependency>
		<dependency>
			<groupId> javax.xml.bind</groupId>
			<artifactId>jaxb-api</artifactId>
			<version>${jaxb-api.version}</version>
		</dependency>
	</dependencies>

	<!-- BUILD PROFILES -->
	<profiles>
		<!-- SPECIAL PROFILE FOR RELEASE DEPLOYMENT BUILDS -->
		<profile>
			<id>release</id>
			<activation>
				<property>
					<name>release-build</name>
				</property>
			</activation>
			<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>
									<!-- NOTE:
										The "{pi4j.gpg.key}" property must be configured in your maven settings.xml file.
										The "{pi4j.gpg.passphrase}" property must be configured in your maven settings.xml file.
										(This is intended only for Pi4J public deployment)
									-->
									<keyname>${pi4j.gpg.key}</keyname>
									<passphrase>${pi4j.gpg.passphrase}</passphrase>
									<gpgArguments>
										<gpgArgument>--pinentry-mode</gpgArgument>
										<gpgArgument>loopback</gpgArgument>
									</gpgArguments>
								</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>

		<!-- SPECIAL PROFILE TO DEPLOY THIS VERSION's SITE CONTENT ON THE Pi4J WEBSITE -->
		<profile>
			<id>deploy-site</id>
			<build>
				<plugins>
					<!-- DEPLOY Pi4J.COM SITE CONTENT/DOCUMENTATION FOR THIS VERSION -->
					<plugin>
						<groupId>com.bazaarvoice.maven.plugins</groupId>
						<artifactId>s3-upload-maven-plugin</artifactId>
						<configuration>
							<recursive>false</recursive>
							<bucketName>pi4j.com</bucketName>
							<accessKey>${pi4j.aws.access.key}</accessKey>
							<secretKey>${pi4j.aws.secret.key}</secretKey>
						</configuration>
						<executions>
							<execution>
								<id>deploy-pi4-site-content</id>
								<phase>site</phase>
								<goals>
									<goal>s3-upload</goal>
								</goals>
								<configuration>
									<source>${project.reporting.outputDirectory}/${project.artifact.selectedVersion.majorVersion}.${project.artifact.selectedVersion.minorVersion}</source>
									<destination>${project.artifact.selectedVersion.majorVersion}.${project.artifact.selectedVersion.minorVersion}</destination>
									<recursive>true</recursive>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<!-- SPECIAL PROFILE TO PUBLISH THIS VERSION AS THE RELEASE VERSION ON THE Pi4J WEBSITE -->
		<profile>
			<id>publish-site</id>
			<build>
				<plugins>
					<!-- CREATE RELEASE VERSIONED Pi4J.COM SITE INDEX -->
					<plugin>
						<groupId>com.google.code.maven-replacer-plugin</groupId>
						<artifactId>maven-replacer-plugin</artifactId>
						<version>${maven-replacer-plugin.version}</version>
						<executions>
							<execution>
								<id>scss-replacement</id>
								<phase>site</phase>
								<goals>
									<goal>replace</goal>
								</goals>
								<configuration>
									<file>src/site/root/index.html</file>
									<token>\$\{VERSION\}</token>
									<value>${project.artifact.selectedVersion.majorVersion}.${project.artifact.selectedVersion.minorVersion}</value>
									<outputFile>${project.reporting.outputDirectory}/index.html</outputFile>
								</configuration>
							</execution>
						</executions>
					</plugin>

					<!-- DEPLOY Pi4J.COM SITE INDEX FOR THIS VERSION -->
					<plugin>
						<groupId>com.bazaarvoice.maven.plugins</groupId>
						<artifactId>s3-upload-maven-plugin</artifactId>
						<configuration>
							<recursive>false</recursive>
							<bucketName>pi4j.com</bucketName>
							<accessKey>${pi4j.aws.access.key}</accessKey>
							<secretKey>${pi4j.aws.secret.key}</secretKey>
						</configuration>
						<executions>
							<execution>
								<id>deploy-pi4-gpg-public-key</id>
								<phase>site</phase>
								<goals>
									<goal>s3-upload</goal>
								</goals>
								<configuration>
									<source>${project.reporting.outputDirectory}/index.html</source>
									<destination>index.html</destination>
									<recursive>true</recursive>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

        <!-- SPECIAL PROFILE TO INCLUDE NATIVE LIBRARY BUILDS FOR RASPBERRY PI -->
        <profile>
            <id>native</id>
            <activation>
                <property>
                    <name>release-build</name>
                </property>
            </activation>
            <properties>
                <raspberrypi.build>true</raspberrypi.build>
            </properties>
            <modules>
                <module>pi4j-native</module>
            </modules>
        </profile>

		<!-- SPECIAL PROFILE TO ENABLE DOCKER-COMPILER NATIVE BUILDS BY DEFAULT IF RUNNING ON MACOS -->
		<profile>
			<id>mac</id>
			<activation>
				<os>
					<family>mac</family>
				</os>
			</activation>
			<properties>
				<pi4j.native.compiler.effective>DOCKER-COMPILER</pi4j.native.compiler.effective>
			</properties>
		</profile>

		<!-- SPECIAL PROFILE TO ENABLE DOCKER-COMPILER NATIVE BUILDS BY DEFAULT IF RUNNING ON WINDOWS -->
		<profile>
			<id>windows</id>
			<activation>
				<os>
					<family>windows</family>
				</os>
			</activation>
			<properties>
				<pi4j.native.compiler.effective>DOCKER-COMPILER</pi4j.native.compiler.effective>
			</properties>
		</profile>

		<!-- SPECIAL PROFILE TO SUPPORT DOCKER-COMPILER NATIVE BUILDS -->
		<profile>
			<id>docker</id>
			<activation>
				<property>
					<name>pi4j.native.compiler</name>
					<value>DOCKER-COMPILER</value>
				</property>
			</activation>
			<properties>
				<pi4j.native.compiler.effective>DOCKER-COMPILER</pi4j.native.compiler.effective>
			</properties>
		</profile>

		<!-- SPECIAL PROFILE TO SUPPORT CROSS-COMPILER NATIVE BUILDS -->
		<profile>
			<id>cross-compile</id>
			<activation>
				<property>
					<name>pi4j.native.compiler</name>
					<value>CROSS-COMPILER</value>
				</property>
			</activation>
			<properties>
				<pi4j.native.compiler.effective>CROSS-COMPILER</pi4j.native.compiler.effective>
			</properties>
		</profile>

    </profiles>

	<!-- BUILD INSTRUCTIONS -->
	<build>

		<!-- GLOBAL PROJECT RESOURCES -->
		<resources>
			<resource>
				<directory>${basedir}</directory>
				<filtering>false</filtering>
				<includes>
					<include>LICENSE.txt</include>
					<include>NOTICE.txt</include>
					<include>README.md</include>
				</includes>
			</resource>
		</resources>

		<!-- PLUGIN MANAGEMENT -->
		<pluginManagement>
			<plugins>
				<!-- JAVA COMPILER -->
                <plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>${maven-compiler-plugin.version}</version>
					<configuration>
						<showDeprecation>true</showDeprecation>
						<showWarnings>true</showWarnings>
						<verbose>false</verbose>
					</configuration>
				</plugin>

				<!-- MAVEN JAR PLUGIN -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>${maven-jar-plugin.version}</version>
				</plugin>

				<!-- INCLUDE SOURCE JAR -->
				<plugin>
 					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>${maven-source-plugin.version}</version>
					<executions>
						<execution>
							<id>attach-sources</id>
							<goals>
								<goal>jar</goal>
							</goals>
						</execution>
					</executions>
				</plugin>

				<!-- INCLUDE RESOURCES -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-resources-plugin</artifactId>
					<version>${maven-resource-plugin.version}</version>
					<configuration>
						<encoding>UTF-8</encoding>
					</configuration>
				</plugin>

				<!-- INCLUDE JAVADOC JAR -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>${maven-javadoc-plugin.version}</version>
					<configuration>
						<additionalOptions>
							<!-- TODO :: ELIMINATE JDK INTERNAL REFS -->
							<additionalOption>--add-exports java.base/jdk.internal.misc=ALL-UNNAMED</additionalOption>
							<additionalOption>--add-exports java.base/jdk.internal.ref=ALL-UNNAMED</additionalOption>
                            <additionalOption>-Xdoclint:none</additionalOption>
						</additionalOptions>
					</configuration>
					<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>${maven-dependency-plugin.version}</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>

                <!-- GPG PLUGIN (used to sign JARs) -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>${maven-gpg-plugin.version}</version>
                </plugin>

				<!-- SCM PLUGIN (used to access github) -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-scm-plugin</artifactId>
					<version>${maven-scm-plugin.version}</version>
				</plugin>

				<!-- OSGi BUNDLE -->
				<plugin>
					<groupId>org.apache.felix</groupId>
					<artifactId>maven-bundle-plugin</artifactId>
					<version>${maven-bundle-plugin.version}</version>
					<extensions>true</extensions>
				</plugin>

				<!-- GENERATE LICENSE HEADERS IN SOURCE FILES -->
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>license-maven-plugin</artifactId>
					<version>${license-maven-plugin.version}</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>
								<excludes>
									<exclude>*.sh</exclude> <!-- exclude shell scripts -->
								</excludes>
								<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>${native-maven-plugin.version}</version>
				</plugin>

				<!-- GENERATE SITE DOCUMENTATION -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-site-plugin</artifactId>
					<version>${maven-site-plugin.version}</version>
				</plugin>

				<!-- MAVEN ASSEMBLY PLUGIN -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-assembly-plugin</artifactId>
					<version>${maven-assembly-plugin.version}</version>
				</plugin>

				<!-- MAVEN ASSEMBLY PLUGIN -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-antrun-plugin</artifactId>
					<version>${maven-antrun-plugin.version}</version>
				</plugin>

				<!-- EXEC MAVEN PLUGIN -->
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
 					<artifactId>exec-maven-plugin</artifactId>
					<version>${exec-maven-plugin.version}</version>
				</plugin>

				<!-- DEPLOY GITHUB SITE PLUGIN -->
				<plugin>
					<groupId>com.github.github</groupId>
					<artifactId>site-maven-plugin</artifactId>
					<version>${site-maven-plugin.version}</version>
				</plugin>

				<!-- BUILD HELPER PLUGIN (used to attach license file as artifacts) -->
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>build-helper-maven-plugin</artifactId>
					<version>${build-helper-maven-plugin.version}</version>
				</plugin>

				<!-- CREATE DEBIAN (.DEB) PACKAGE PLUGIN -->
				<plugin>
					<groupId>org.vafer</groupId>
					<artifactId>jdeb</artifactId>
					<version>${jdeb.version}</version>
				</plugin>

				<!-- AWS S3 UPLOAD PLUGIN -->
				<plugin>
					<groupId>com.bazaarvoice.maven.plugins</groupId>
					<artifactId>s3-upload-maven-plugin</artifactId>
					<version>${s3-upload-maven-plugin.version}</version>
				</plugin>

				<!-- Eclipse m2e plugin. It has no influence on the Maven build itself. Only added to enable clean import into Eclipse IDE -->
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>${lifecycle-mapping.version}</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.apache.maven.plugins</groupId>
										<artifactId>maven-antrun-plugin</artifactId>
										<versionRange>[1.3,)</versionRange>
										<goals>
											<goal>run</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.apache.maven.plugins</groupId>
										<artifactId>maven-dependency-plugin</artifactId>
										<versionRange>[2.8,)</versionRange>
										<goals>
											<goal>copy</goal>
											<goal>copy-dependencies</goal>
											<goal>unpack</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.codehaus.mojo</groupId>
										<artifactId>license-maven-plugin</artifactId>
										<versionRange>[1.7,)</versionRange>
										<goals>
											<goal>
												update-file-header
											</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>
											com.github.dantwining.whitespace-maven-plugin
										</groupId>
										<artifactId>
											whitespace-maven-plugin
										</artifactId>
										<versionRange>
											[1.0.4,)
										</versionRange>
										<goals>
											<goal>trim</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>

		<!-- GLOBAL BUILD PLUGINS (used when building all modules) -->
		<plugins>

			<!-- ENFORCING JDK AND MAVEN VERSIONS -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-enforcer-plugin</artifactId>
				<version>${maven-enforcer-plugin.version}</version>
				<executions>
					<execution>
						<id>enforce-java</id>
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
							<rules>
								<requireJavaVersion>
									<version>11</version>
									<message>Building Pi4J requires Java 11</message>
								</requireJavaVersion>
							</rules>
						</configuration>
					</execution>
					<execution>
						<id>enforce-maven</id>
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
							<rules>
								<requireMavenVersion>
									<version>3.3.1</version>
									<message>Building Pi4J requires at least Maven 3.3.1</message>
								</requireMavenVersion>
							</rules>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<!-- USE LATEST SCM PLUGIN TO SUPPORT GIT -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-scm-plugin</artifactId>
				<configuration>
					<goals>install</goals>
				</configuration>
			</plugin>

			<!-- GENERATE LICENSE FILE IN PROJECT ROOT -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>license-maven-plugin</artifactId>
				<version>${license-maven-plugin.version}</version>
				<executions>
					<execution>
						<id>update-project-license</id>
						<goals>
							<goal>update-project-license</goal>
						</goals>
						<phase>process-sources</phase>
						<configuration>
							<licenseName>apache_v2</licenseName>
						</configuration>
					</execution>
					<execution>
						<id>append-license-file-headers</id>
                        <goals>
                            <goal>update-file-header</goal>
                        </goals>
                        <phase>process-sources</phase>
						<configuration>
							<descriptionTemplate>${basedir}/src/license/template.ftl</descriptionTemplate>
						</configuration>
					</execution>
				</executions>
				<inherited>false</inherited>
			</plugin>

			<!-- REMOVE TRAILING WHITESPACE AUTOMATICALLY -->
			<plugin>
				<artifactId>whitespace-maven-plugin</artifactId>
				<groupId>com.github.dantwining.whitespace-maven-plugin</groupId>
				<version>1.0.4</version>
				<executions>
					<execution>
						<phase>process-sources</phase>
						<goals>
							<goal>trim</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- GENERATE SITE DOCUMENTATION -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-site-plugin</artifactId>
				<version>${maven-site-plugin.version}</version>
				<inherited>false</inherited>
				<configuration>
                    <generateProjectInfo>true</generateProjectInfo>
                    <generateReports>true</generateReports>
                    <generateSitemap>true</generateSitemap>
					<outputDirectory>${project.reporting.outputDirectory}/${project.artifact.selectedVersion.majorVersion}.${project.artifact.selectedVersion.minorVersion}</outputDirectory>
				</configuration>
				<dependencies>
					<dependency>
						<groupId>org.apache.velocity</groupId>
						<artifactId>velocity</artifactId>
						<version>${apache-velocity.version}</version>
					</dependency>
				</dependencies>
			</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>
		</plugins>
	</build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven-javadoc-plugin.version}</version>
                <reportSets>
                    <reportSet>
                        <id>non-aggregate</id>
                        <configuration>
                            <verbose>false</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>${maven-project-info-reports-plugin.version}</version>
                <configuration>
                    <artifactId>pi4j-core</artifactId>
                </configuration>
                <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>
        </plugins>
    </reporting>
</project>
