<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.cisco.maven.plugins</groupId>
	<artifactId>cisco-maven-plugins-parent</artifactId>
	<version>1.0.0</version>
	<packaging>pom</packaging>
	
	<name>Cisco Maven Plugins Parent POM</name>
	<description>Provides common property and build management of various Cisco Maven Plugins.</description>
	<url>https://ciscodevnet.github.io</url>
	
	<organization>
		<name>Cisco Systems, Inc.</name>
		<url>https://www.cisco.com</url>
	</organization>
	
	<scm>
		<connection>scm:git:https://github.com/CiscoDevNet/maven-plugins.git</connection>
		<developerConnection>scm:git:git@github.com:CiscoDevNet/maven-plugins.git</developerConnection>
		<url>https://github.com/CiscoDevNet/maven-plugins</url>
		<tag>cisco-maven-plugins-parent-1.0.0</tag>
	</scm>

	<issueManagement>
		<system>GitHub</system>
		<url>https://github.com/CiscoDevNet/maven-plugins/issues</url>
	</issueManagement>
	
	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
		</repository>
	</distributionManagement>
	
	<licenses>
		<license>
			<name>Cisco Sample Code License v1.1</name>
			<url>./LICENSE.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>
	
	<developers>
		<developer>
			<id>danijoh2</id>
			<name>Daniel Johnson</name>
			<email>danijoh2@cisco.com</email>
			<organization>Cisco Systems, Inc.</organization>
			<organizationUrl>https://www.cisco.com</organizationUrl>
			<timezone>America/Los_Angeles</timezone>
			<roles>
				<role>developer</role>
				<role>lead</role>
			</roles>
		</developer>
	</developers>
	
	<properties>
		<!-- Build Plugin Versions -->
		<maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
		<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
		<maven-javadoc-plugin.version>3.0.0</maven-javadoc-plugin.version>
		<maven-plugin-plugin.version>3.4</maven-plugin-plugin.version>
		<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
		<maven-source-plugin.version>3.0.1</maven-source-plugin.version>
		<maven-site-plugin.version>3.7</maven-site-plugin.version>
		
		<!-- Site Dependency Versions -->
		<maven-fluido-skin.version>1.7</maven-fluido-skin.version>

		<!-- Project Settings -->
		<java.version>1.8</java.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>
	
	<build>
		<plugins>
			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
			</plugin>
		</plugins>

		<pluginManagement>
			<plugins>
				<plugin>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>${maven-compiler-plugin.version}</version>
					<configuration>
						<source>${java.version}</source>
						<target>${java.version}</target>
					</configuration>
				</plugin>
				<plugin>
					<artifactId>maven-gpg-plugin</artifactId>
					<version>${maven-gpg-plugin.version}</version>
					<configuration>
						<keyname>${gpg.keyname}</keyname>
						<passphraseServerId>${gpg.keyname}</passphraseServerId>
						<gpgArguments>
							<!-- This is required with GPG 2.1+ to allow key to come from active Maven settings.xml -->
							<arg>--pinentry-mode</arg>
							<arg>loopback</arg>
						</gpgArguments>
					</configuration>
				</plugin>
				<plugin>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>${maven-javadoc-plugin.version}</version>
					<configuration>
						<excludePackageNames>*.internal</excludePackageNames>
					</configuration>
				</plugin>
				<plugin>
					<artifactId>maven-plugin-plugin</artifactId>
					<version>${maven-plugin-plugin.version}</version>
				</plugin>
				<plugin>
					<artifactId>maven-release-plugin</artifactId>
					<version>${maven-release-plugin.version}</version>
					<configuration>
						<useReleaseProfile>false</useReleaseProfile>
						<releaseProfiles>release</releaseProfiles>
					</configuration>
				</plugin>
				<plugin>
					<artifactId>maven-source-plugin</artifactId>
					<version>${maven-source-plugin.version}</version>
				</plugin>
				<plugin>
					<artifactId>maven-site-plugin</artifactId>
					<version>${maven-site-plugin.version}</version>
					<configuration>
						<!-- Using github:site-maven-plugin for deployment -->
						<skipDeploy>true</skipDeploy>
						<inputEncoding>UTF-8</inputEncoding>
						<outputEncoding>UTF-8</outputEncoding>
					</configuration>
				</plugin>
				<plugin>
					<groupId>com.github.github</groupId>
					<artifactId>site-maven-plugin</artifactId>
					<version>0.9</version>
					<configuration>
						<server>github</server>
						<repositoryOwner>ciscodevnet</repositoryOwner>
						<repositoryName>ciscodevnet.github.io</repositoryName>
						<message>Site documentation for ${project.artifactId} v${project.version}</message>
						<path>maven-plugins/${project.artifactId}</path>
						<!-- TODO: Need to thoroughly test this plugin and downstream projects
							before allowing them to commit direct to master -->
						<branch>development</branch>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.doxia</groupId>
					<artifactId>doxia-site-renderer</artifactId>
					<version>1.8</version>
				</plugin>
				<plugin>
					<groupId>org.sonatype.plugins</groupId>
					<artifactId>nexus-staging-maven-plugin</artifactId>
					<version>1.6.8</version>
					<extensions>true</extensions>
					<configuration>
						<serverId>ossrh</serverId>
						<nexusUrl>https://oss.sonatype.org/</nexusUrl>
						<!-- TODO: Need to thoroughly test this plugin and downstream projects
							before allowing auto-release -->
						<autoReleaseAfterClose>true</autoReleaseAfterClose>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>
	
	<reporting>
		<excludeDefaults>true</excludeDefaults>
		<outputDirectory>${project.build.directory}/site</outputDirectory>
		<plugins>
			<plugin>
				<artifactId>maven-plugin-plugin</artifactId>
			</plugin>
			<plugin>
				<artifactId>maven-javadoc-plugin</artifactId>
			</plugin>
			<plugin>
				<artifactId>maven-changes-plugin</artifactId>
				<version>2.12.1</version>	
				<reportSets>
					<reportSet>
						<reports>
							<report>changes-report</report>
						</reports>
					</reportSet>
				</reportSets>
			</plugin>
			<plugin>
				<artifactId>maven-changelog-plugin</artifactId>
				<version>2.3</version>
			</plugin>
			<plugin>
				<artifactId>maven-project-info-reports-plugin</artifactId>
				<version>2.9</version>
				<configuration>
					<dependencyDetailsEnabled>false</dependencyDetailsEnabled>
				</configuration>
				<reportSets>
					<reportSet>
						<reports>
							<report>cim</report>
							<report>dependencies</report>
							<report>dependency-info</report>
							<report>issue-tracking</report>
							<report>license</report>
							<report>project-team</report>
							<report>scm</report>
							<report>summary</report>
						</reports>
					</reportSet>
				</reportSets>
			</plugin>
		</plugins>
	</reporting>
	
	<profiles>
		<profile>
			<!-- If testing on Mac CLI, run 'export GPG_TTY=$(tty)' before build, or you may see:
			gpg: signing failed: Inappropriate ioctl for device -->
			<id>release</id>
			<build>
				<plugins>
					<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>
						<groupId>com.github.github</groupId>
						<artifactId>site-maven-plugin</artifactId>
						<executions>
							<execution>
								<id>publish-release-docs</id>
								<phase>site-deploy</phase>
								<goals>
									<goal>site</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>