<?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>
	<groupId>com.github.bbottema</groupId>
	<artifactId>standard-project-parent-nodeps</artifactId>
	<packaging>pom</packaging>
	<name>standard-project-parent-nodeps</name>
	<version>1.0.1</version>
	<description>Benny's standard parent POM full of default sweetness and boilerplate code, but without the extra dependencies.</description>
	<url>https://github.com/bbottema/standard-project-parent-nodeps</url>
	<inceptionYear>2019</inceptionYear>

	<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>
		</license>
	</licenses>

	<scm>
		<connection>scm:git:git://github.com/bbottema/standard-project-parent-nodeps.git</connection>
		<developerConnection>scm:git:git@github.com:bbottema/standard-project-parent-nodeps.git</developerConnection>
		<url>https://github.com/bbottema/standard-project-parent-nodeps</url>
	</scm>

	<developers>
		<developer>
			<id>benny</id>
			<name>Benny Bottema</name>
			<email>benny@bennybottema.com</email>
			<url>http://www.bennybottema.com</url>
			<roles>
				<role>developer</role>
				<role>packager</role>
			</roles>
		</developer>
	</developers>

	<issueManagement>
		<system>GitHub Issues</system>
		<url>https://github.com/bbottema/standard-project-parent-nodeps/issues</url>
	</issueManagement>

	<properties>
		<java.version>1.8</java.version>
		<compiler.encoding>UTF-8</compiler.encoding>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<maven.compiler.source>${java.version}</maven.compiler.source>
		<maven.compiler.target>${java.version}</maven.compiler.target>
		<!-- license plugin, see possible types here: -->
		<!-- https://github.com/mathieucarbou/license-maven-plugin/tree/master/license-maven-plugin/src/main/resources/com/mycila/maven/plugin/license/templates -->
		<license.type>com/mycila/maven/plugin/license/templates/APACHE-2.txt</license.type>
		<license.owner.name>John Doe</license.owner.name>
		<license.owner.email>johndoe@mysteryministry.com</license.owner.email>
		<!-- nullability instrumenter plugin -->
		<se.eris.notnull.instrument>false</se.eris.notnull.instrument>
		<automaticModuleName>${project.artifactId}</automaticModuleName>
		<log4j.version>2.22.1</log4j.version>
		<mockito.version>4.11.0</mockito.version>
		<junit.version>5.10.2</junit.version>
	</properties>

	<dependencies>
		<dependency><!-- Gives us Spotbugs maven build directives -->
			<groupId>com.github.spotbugs</groupId>
			<artifactId>spotbugs-annotations</artifactId>
		</dependency>
	</dependencies>

	<dependencyManagement>
		<dependencies>
			<dependency><!-- Gives us Spotbugs maven build directives -->
				<groupId>com.github.spotbugs</groupId>
				<artifactId>spotbugs-annotations</artifactId>
				<version>3.1.3</version>
				<scope>provided</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

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

	<build>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
			</resource>
			<resource>
				<directory>.</directory>
				<includes>
					<include>LICENSE-2.0.txt</include>
					<include>NOTICE.txt</include>
					<include>RELEASE.txt</include>
				</includes>
			</resource>
		</resources>

		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-enforcer-plugin</artifactId>
				<version>3.0.0-M3</version>
				<executions>
					<execution>
						<id>enforce-versions</id>
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
							<rules>
								<dependencyConvergence/>
								<requireReleaseDeps>
									<onlyWhenRelease>true</onlyWhenRelease>
								</requireReleaseDeps>
							</rules>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.sonatype.ossindex.maven</groupId>
				<artifactId>ossindex-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>audit-dependencies</id>
						<phase>validate</phase>
						<goals>
							<goal>audit</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<extensions>true</extensions>
				<configuration>
					<serverId>ossrh</serverId>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
					<autoReleaseAfterClose>true</autoReleaseAfterClose>
				</configuration>
			</plugin>

			<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>
				<configuration>
					<doclint>all,-missing</doclint>
					<show>public</show>
					<nohelp>true</nohelp>
					<detectOfflineLinks>false</detectOfflineLinks>
					<excludePackageNames>*.internal:*.internal.*:testutil:demo</excludePackageNames>
					<quiet>true</quiet>
					<failOnError>false</failOnError>
				</configuration>
				<executions>
					<execution>
						<id>jar</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>${java.version}</source>
					<target>${java.version}</target>
					<encoding>${compiler.encoding}</encoding>
					<compilerArgument>-Xlint:all</compilerArgument>
					<useIncrementalCompilation>false</useIncrementalCompilation>
				</configuration>
			</plugin>

			<plugin><!-- this plugin must come before notnull instrumenter -->
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>default-prepare-agent</id>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
						<configuration>
							<!-- this turns off on-the-fly instrumentation, because we manually instrument so we
								can fix the plugin order with the notnull plugin -->
							<excludes>*</excludes>
						</configuration>
					</execution>
					<!-- normally not needed to specify, but we need to make sure it comes after notnull instrument -->
					<execution>
						<id>instrument</id>
						<goals>
							<goal>instrument</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin><!-- this plugin must come after jacoco instrument -->
				<groupId>se.eris</groupId>
				<artifactId>notnull-instrumenter-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>instrument</id>
						<goals>
							<goal>instrument</goal>
							<goal>tests-instrument</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<implicit>true</implicit>
					<nullable>
						<param>org.jetbrains.annotations.Nullable</param>
					</nullable>
					<notNull>
						<param>org.jetbrains.annotations.NotNull</param>
					</notNull>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<configuration>
					<archive>
						<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
						<manifestEntries>
							<Automatic-Module-Name>${automaticModuleName}</Automatic-Module-Name>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>

			<plugin><!-- OSGI support -->
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<executions>
					<execution>
						<id>bundle-manifest</id>
						<phase>process-classes</phase>
						<goals>
							<goal>manifest</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>com.github.spotbugs</groupId>
				<artifactId>spotbugs-maven-plugin</artifactId>
				<!-- this will make findbugs run during mvn verify -->
				<executions>
					<execution>
						<phase>verify</phase>
						<goals>
							<goal>check</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>com.mycila</groupId>
				<artifactId>license-maven-plugin</artifactId>
				<configuration>
					<header>${license.type}</header>
					<properties>
						<owner>${license.owner.name}</owner>
						<email>${license.owner.email}</email>
					</properties>
					<mapping>
						<java>SLASHSTAR_STYLE</java>
					</mapping>
					<includes>
						<include>src/main/java/**/*.java</include>
					</includes>
				</configuration>
				<executions>
					<execution><id>remove-licence-boilerplate-on-clean</id><phase>clean</phase><goals><goal>remove</goal></goals></execution>
					<execution><id>add-licence-boilerplate-on-compile</id><phase>process-sources</phase><goals><goal>format</goal></goals></execution>
					<execution><id>remove-licence-boilerplate-after-package</id><phase>package</phase><goals><goal>remove</goal></goals></execution>
				</executions>
			</plugin>
		</plugins>

		<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
			<plugins>
				<plugin>
					<groupId>org.sonatype.plugins</groupId>
					<artifactId>nexus-staging-maven-plugin</artifactId>
					<version>1.6.3</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>3.0.1</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.5.1</version>
				</plugin>
				<plugin>
					<groupId>org.jacoco</groupId>
					<artifactId>jacoco-maven-plugin</artifactId>
					<version>0.8.1</version>
				</plugin>
				<plugin>
					<groupId>se.eris</groupId>
					<artifactId>notnull-instrumenter-maven-plugin</artifactId>
					<version>0.6.8</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>3.1.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.felix</groupId>
					<artifactId>maven-bundle-plugin</artifactId>
					<version>3.5.1</version>
				</plugin>
				<plugin>
					<groupId>com.github.spotbugs</groupId>
					<artifactId>spotbugs-maven-plugin</artifactId>
					<version>3.1.12.2</version>
				</plugin>
				<plugin>
					<groupId>com.mycila</groupId>
					<artifactId>license-maven-plugin</artifactId>
					<version>3.0</version>
				</plugin>
				<!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
				<plugin>
					<artifactId>maven-clean-plugin</artifactId>
					<version>3.1.0</version>
				</plugin>
				<!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
				<plugin>
					<artifactId>maven-resources-plugin</artifactId>
					<version>3.0.2</version>
				</plugin>
				<plugin>
					<artifactId>maven-release-plugin</artifactId>
					<version>2.5.2</version>
				</plugin>
				<plugin>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>3.1.1</version>
				</plugin>
				<plugin>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>2.22.1</version>
				</plugin>
				<plugin>
					<artifactId>maven-install-plugin</artifactId>
					<version>2.5.2</version>
				</plugin>
				<plugin>
					<artifactId>maven-deploy-plugin</artifactId>
					<version>2.8.2</version>
				</plugin>
				<!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
				<plugin>
					<artifactId>maven-site-plugin</artifactId>
					<version>3.7.1</version>
				</plugin>
				<plugin>
					<artifactId>maven-project-info-reports-plugin</artifactId>
					<version>3.0.0</version>
				</plugin>
				<!-- plugin to scan for vulnerabilities -->
				<plugin>
					<groupId>org.sonatype.ossindex.maven</groupId>
					<artifactId>ossindex-maven-plugin</artifactId>
					<version>3.1.0</version>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<profiles>
		<profile>
			<id>load-spotbugs-exclude-xml</id>
			<activation>
				<file><exists>spotbugs-exclude.xml</exists></file>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>com.github.spotbugs</groupId>
						<artifactId>spotbugs-maven-plugin</artifactId>
						<configuration>
							<excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>release-sign-artifacts</id>
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.5</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
								<!-- fixes tty error under linux -->
								<configuration>
									<gpgArguments>
										<arg>--pinentry-mode</arg>
										<arg>loopback</arg>
									</gpgArguments>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
