<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>
	<parent>
		<groupId>gov.nist.secauto</groupId>
		<artifactId>oss-maven</artifactId>
		<version>20</version>
	</parent>

	<artifactId>oss-parent</artifactId>

	<packaging>pom</packaging>

	<name>Parent POM</name>
	<description>A Common Maven Build Parent for NIST Open Source Projects, that provides for centralized management of plugin versions, code style, and other code quality checks.</description>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
			</plugin>

			<!-- <plugin> -->
			<!-- <artifactId>maven-site-plugin</artifactId> -->
			<!-- <executions> -->
			<!-- <execution> -->
			<!-- <id>attach-descriptor</id> -->
			<!-- <goals> -->
			<!-- <goal>attach-descriptor</goal> -->
			<!-- </goals> -->
			<!-- </execution> -->
			<!-- </executions> -->
			<!-- </plugin> -->

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-scm-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>com.mycila</groupId>
				<artifactId>license-maven-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<configuration>
					<mavenExecutorId>forked-path</mavenExecutorId>
					<useReleaseProfile>false</useReleaseProfile>
					<arguments>-Prelease</arguments>
					<tagNameFormat>v@{project.version}</tagNameFormat>
					<autoVersionSubmodules>false</autoVersionSubmodules>
				</configuration>
			</plugin>
		</plugins>

		<!-- <extensions> <extension> <groupId>org.apache.maven.scm</groupId> <artifactId>maven-scm-provider-gitexe</artifactId> 
			<version>1.9.1</version> </extension> <extension> <groupId>org.apache.maven.scm</groupId> 
			<artifactId>maven-scm-manager-plexus</artifactId> <version>1.9.1</version> 
			</extension> <extension> <groupId>org.kathrynhuxtable.maven.wagon</groupId> 
			<artifactId>wagon-gitsite</artifactId> <version>0.3.1</version> </extension> 
			</extensions> -->
	</build>

	<profiles>
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<goal>jar-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<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>
					<plugin>
						<groupId>net.revelc.code.formatter</groupId>
						<artifactId>formatter-maven-plugin</artifactId>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-checkstyle-plugin</artifactId>
						<configuration>
							<!-- fail on validation for release -->
							<failOnViolation>true</failOnViolation>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-pmd-plugin</artifactId>
						<executions>
							<execution>
								<id>pmd-verify</id>
								<phase>verify</phase>
								<goals>
									<goal>check</goal>
								</goals>
								<configuration>
									<failOnViolation>true</failOnViolation>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>reporting</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.jacoco</groupId>
						<artifactId>jacoco-maven-plugin</artifactId>
						<executions>
							<execution>
								<id>default-prepare-agent</id>
								<goals>
									<goal>prepare-agent</goal>
								</goals>
							</execution>
							<execution>
								<id>default-report</id>
								<phase>prepare-package</phase>
								<goals>
									<goal>report</goal>
								</goals>
							</execution>
							<execution>
								<id>default-check</id>
								<goals>
									<goal>check</goal>
								</goals>
								<configuration>
									<haltOnFailure>false</haltOnFailure>
									<rules>
										<rule>
											<element>BUNDLE</element>
											<limits>
												<limit>
													<counter>COMPLEXITY</counter>
													<value>COVEREDRATIO</value>
													<minimum>0.60</minimum>
												</limit>
											</limits>
										</rule>
									</rules>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-pmd-plugin</artifactId>
					</plugin>
				</plugins>
			</build>
			<reporting>
				<excludeDefaults>true</excludeDefaults>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-site-plugin</artifactId>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-project-info-reports-plugin</artifactId>
						<!-- <reportSets> -->
						<!-- <reportSet> -->
						<!-- <id>default</id> -->
						<!-- <reports> -->
						<!-- <report>index</report> -->
						<!-- <report>dependency-info</report> -->
						<!-- <report>team</report> -->
						<!-- <report>mailing-lists</report> -->
						<!-- <report>scm</report> -->
						<!-- </reports> -->
						<!-- </reportSet> -->
						<!-- </reportSets> -->
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-jxr-plugin</artifactId>
						<configuration>
							<linkJavadoc>true</linkJavadoc>
						</configuration>
					</plugin>
					<!-- <plugin> -->
					<!-- <groupId>org.codehaus.mojo</groupId> -->
					<!-- <artifactId>jdepend-maven-plugin</artifactId> -->
					<!-- </plugin> -->

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-report-plugin</artifactId>
					</plugin>
					<!-- <plugin> -->
					<!-- <groupId>org.codehaus.mojo</groupId> -->
					<!-- <artifactId>cobertura-maven-plugin</artifactId> -->
					<!-- </plugin> -->


					<plugin>
						<groupId>org.jacoco</groupId>
						<artifactId>jacoco-maven-plugin</artifactId>
						<reportSets>
							<reportSet>
								<reports>
									<!-- select non-aggregate reports -->
									<report>report</report>
								</reports>
							</reportSet>
						</reportSets>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-pmd-plugin</artifactId>
						<configuration>
							<linkXref>true</linkXref>
							<minimumTokens>100</minimumTokens>
							<targetJdk>${maven.compiler.target}</targetJdk>
							<analysisCache>true</analysisCache>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>taglist-maven-plugin</artifactId>
						<configuration>
							<tagListOptions>
								<tagClasses>
									<tagClass>
										<displayName>Todo Work</displayName>
										<tags>
											<tag>
												<matchString>TODO</matchString>
												<matchType>ignoreCase</matchType>
											</tag>
											<tag>
												<matchString>FIXME</matchString>
												<matchType>ignoreCase</matchType>
											</tag>
										</tags>
									</tagClass>
								</tagClasses>
							</tagListOptions>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-checkstyle-plugin</artifactId>
						<configuration>
							<configLocation>checkstyle/checkstyle.xml</configLocation>
							<skip>false</skip>
						</configuration>
						<reportSets>
							<reportSet>
								<reports>
									<report>checkstyle</report>
								</reports>
							</reportSet>
						</reportSets>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<reportSets>
							<reportSet>
								<reports>
									<report>javadoc-no-fork</report>
								</reports>
							</reportSet>
						</reportSets>
					</plugin>
				</plugins>
			</reporting>
		</profile>
		<profile>
			<id>only-eclipse</id>
			<activation>
				<property>
					<name>m2e.version</name>
				</property>
			</activation>
			<build>
				<pluginManagement>
					<plugins>
						<!-- for the m2e peeps -->
						<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.0,)</versionRange>
												<goals>
													<goal>enforce</goal>
												</goals>
											</pluginExecutionFilter>
											<action>
												<ignore />
											</action>
										</pluginExecution>
										<pluginExecution>
											<pluginExecutionFilter>
												<groupId>net.revelc.code.formatter</groupId>
												<artifactId>formatter-maven-plugin</artifactId>
												<versionRange>[2.6.0,)</versionRange>
												<goals>
													<goal>validate</goal>
												</goals>
											</pluginExecutionFilter>
											<action>
												<ignore />
											</action>
										</pluginExecution>
										<pluginExecution>
											<pluginExecutionFilter>
												<groupId>org.apache.maven.plugins</groupId>
												<artifactId>maven-pmd-plugin</artifactId>
												<versionRange>[3.14.0,)</versionRange>
												<goals>
													<goal>check</goal>
													<goal>cpd-check</goal>
												</goals>
											</pluginExecutionFilter>
											<action>
												<ignore />
											</action>
										</pluginExecution>
-->
									</pluginExecutions>
								</lifecycleMappingMetadata>
							</configuration>
						</plugin>
					</plugins>
				</pluginManagement>
			</build>
		</profile>
	</profiles>
</project>