<?xml version="1.0" encoding="UTF-8"?>
<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>io.earcam</groupId>
		<artifactId>io.earcam.maven</artifactId>
		<version>2.1.1</version>
	</parent>

	<groupId>io.earcam.maven</groupId>
	<artifactId>io.earcam.maven.pom</artifactId>
	<packaging>pom</packaging>

	<name>${project.artifactId}</name>
	<description>Parent/root POM</description>

	<reporting>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-site-plugin</artifactId>
				<configuration>
					<topSiteURL>http://earcam.io</topSiteURL>
					<generateSitemap>true</generateSitemap>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.revapi</groupId>
				<artifactId>revapi-maven-plugin</artifactId>
				<reportSets>
					<reportSet>
						<reports>
							<report>report</report>
							<report>report-aggregate</report>
						</reports>
					</reportSet>
				</reportSets>
			</plugin>			

			<plugin>
				<groupId>org.pitest</groupId>
				<artifactId>pitest-maven</artifactId>
				<reportSets>
					<reportSet>
						<reports>
							<report>report</report>
						</reports>
					</reportSet>
				</reportSets>
			</plugin>

			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<reportSets>
					<reportSet>
						<inherited>false</inherited>
						<reports>
							<report>aggregate</report>
						</reports>
					</reportSet>
				</reportSets>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<reportSets>
					<reportSet>
						<id>main</id>
						<reports>
							<report>javadoc</report>
							<report>aggregate</report>
						</reports>
					</reportSet>
					<reportSet>
						<id>test</id>
						<reports>
							<report>test-javadoc</report>
							<report>aggregate</report>
						</reports>
					</reportSet>
				</reportSets>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jxr-plugin</artifactId>
				<version>2.5</version>
				<configuration>
					<aggregate>true</aggregate>
					<bottom>
						Copyright © {inceptionYear}―{currentYear}
						{organizationName}. All rights reserved.. 
					</bottom>
				</configuration>
				<reportSets>
					<reportSet>
						<id>aggregate</id>
						<inherited>false</inherited>
						<reports>
							<report>jxr</report>
							<report>jxr-test</report>
							<report>aggregate</report>
						</reports>
					</reportSet>
				</reportSets>
			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>jdepend-maven-plugin</artifactId>
				<version>2.0</version>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<version>2.10</version>
				<reportSets>
					<reportSet>
						<reports>
							<report>analyze-report</report>
						</reports>
					</reportSet>
				</reportSets>
			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>license-maven-plugin</artifactId>
				<reportSets>
					<reportSet>
						<reports>
							<report>third-party-report</report>
						</reports>
					</reportSet>
				</reportSets>
			</plugin>

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

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>taglist-maven-plugin</artifactId>
				<version>2.4</version>
				<configuration>
						<tagListOptions>
							<tagClasses>
								<tagClass>
									<displayName>FIXME</displayName>
									<tags>
										<tag>
											<matchString>FIXME</matchString>
										</tag>
									</tags>
								</tagClass>
								<tagClass>
									<displayName>TODO</displayName>
									<tags>
										<tag>
											<matchString>TODO</matchString>
										</tag>
									</tags>
								</tagClass>
								<tagClass>
									<displayName>Deprecation</displayName>
									<tags>
										<tag>
											<matchString>@deprecated</matchString>
										</tag>
									</tags>
								</tagClass>
							</tagClasses>
						</tagListOptions>
					</configuration>
			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>versions-maven-plugin</artifactId>
				<version>2.4</version>
				<reportSets>
					<reportSet>
						<reports>
							<report>dependency-updates-report</report>
							<report>plugin-updates-report</report>
							<report>property-updates-report</report>
						</reports>
					</reportSet>
				</reportSets>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-pmd-plugin</artifactId>
				<version>3.8</version>
				<configuration>
					<targetjdk>${version.java}</targetjdk>
					<linkXref>true</linkXref>
					<format>xml</format>
					<sourceEncoding>${project.build.sourceEncoding}</sourceEncoding>
					<minimumTokens>100</minimumTokens>
				</configuration>
				<reportSets>
					<reportSet>
						<reports>
							<report>pmd</report>
						</reports>
					</reportSet>
				</reportSets>
			</plugin>

			<plugin>
				<groupId>org.owasp</groupId>
				<artifactId>dependency-check-maven</artifactId>
				<reportSets>
					<reportSet>
						<reports>
							<report>aggregate</report>
						</reports>
					</reportSet>
				</reportSets>
			</plugin>			
		</plugins>
	</reporting>

	<profiles>
		<profile>
			<id>strict</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>

			<build>
				<plugins>
					<plugin>
						<groupId>net.revelc.code.formatter</groupId>
						<artifactId>formatter-maven-plugin</artifactId>
						<executions>
							<execution>
								<id>strict-format</id>
								<goals>
									<goal>validate</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>license-maven-plugin</artifactId>
						<executions>
							<execution>
								<id>strict-licence</id>
								<goals>
									<goal>check-file-header</goal>
								</goals>
								<phase>process-sources</phase>
								<configuration>
									<failOnMissingHeader>true</failOnMissingHeader>
									<failOnNotUptodateHeader>true</failOnNotUptodateHeader>
									<ignoreNoFileToScan>true</ignoreNoFileToScan>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>tidy</id>

			<build>
				<plugins>
					<plugin>
						<groupId>net.revelc.code.formatter</groupId>
						<artifactId>formatter-maven-plugin</artifactId>
						<executions>
							<execution>
								<id>tidy-format</id>
								<goals>
									<goal>format</goal>
								</goals>
								<phase>process-sources</phase>
							</execution>
						</executions>
					</plugin>

					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>license-maven-plugin</artifactId>
						<executions>
							<execution>
								<id>tidy-licence</id>
								<goals>
									<goal>update-file-header</goal>
								</goals>
								<phase>process-sources</phase>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
