<!-- Copyright (c) 2018 BITPlan GmbH Project details and license at: https://github.com/BITPlan/com.bitplan.pom -->
<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/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>com.bitplan.pom</groupId>
	<artifactId>com.bitplan.pom</artifactId>
	<version>0.0.11</version>
	<packaging>pom</packaging>
	<name>BITPlan Maven Parent POM</name>
	<description>definition of common generic maven aspects of BITPlan's projects</description>
	<url>https://github.com/${github.owner}/${github.project}</url>
	<organization>
		<name>BITPlan GmbH</name>
		<url>http://www.bitplan.com</url>
	</organization>
	<developers>
		<developer>
			<id>wf</id>
			<name>Wolfgang Fahl</name>
			<organization>BITPlan GmbH</organization>
			<organizationUrl>http://www.bitplan.com</organizationUrl>
		</developer>
	</developers>
	<licenses>
		<license>
			<name>Apache 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0</url>
		</license>
	</licenses>
	<scm>
		<connection>scm:git:https://github.com/${github.owner}</connection>
		<developerConnection>scm:git:https://github.com/${github.owner}</developerConnection>
		<url>https://github.com/${github.owner}</url>
	</scm>
	<issueManagement>
		<url>https://github.com/${github.owner}/${github.project}/issues</url>
		<system>GitHub</system>
	</issueManagement>
	<properties>
		<!-- standard Java Version -->
		<java.version>1.8</java.version>
		<!-- http://stackoverflow.com/questions/3017695/how-to-configure-encoding-in-maven -->
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

		<!-- github server corresponds to entry in ~/.m2/settings.xml -->
		<github.global.server>github</github.global.server>
		<!-- also used by README generator script -->
		<github.project>com.bitplan.pom</github.project>
		<github.owner>BITPlan</github.owner>

		<github.site.path>${project.version}</github.site.path>

		<!-- https://stackoverflow.com/questions/15886209/maven-is-not-working-in-java-8-when-javadoc-tags-are-incomplete -->
		<javadoc.opts>-Xdoclint:none</javadoc.opts>

		<!-- Version numbers -->
		<!-- https://mvnrepository.com/artifact/com.mycila/license-maven-plugin 
			(latest: 3.0 Aug 2016) we purposely use an older version -->
		<com.mycila.maven-license-plugin.version>1.9.0</com.mycila.maven-license-plugin.version>
		<!-- https://mvnrepository.com/artifact/org.sonatype.plugins/nexus-staging-maven-plugin -->
		<nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
		<!-- https://mvnrepository.com/artifact/com.akathist.maven.plugins.launch4j/launch4j-maven-plugin -->
		<launch4j-maven-plugin.version>1.7.22</launch4j-maven-plugin.version>
		<!-- Maven Plugins https://mvnrepository.com/artifact/org.apache.maven.plugins -->
		<maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
		<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-surefire-plugin -->
		<maven-surefire-plugin.version>2.18.1</maven-surefire-plugin.version>
		<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-jar-plugin -->
		<maven-jar-plugin.version>3.1.0</maven-jar-plugin.version>
		<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-antrun-plugin -->
		<maven-antrun-plugin.version>1.8</maven-antrun-plugin.version>
		<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-assembly-plugin -->
		<maven-assembly-plugin.version>3.1.0</maven-assembly-plugin.version>
		<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-shade-plugin -->
		<maven-shade-plugin.version>3.1.1</maven-shade-plugin.version>
		<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-source-plugin -->
		<maven-source-plugin.version>3.0.1</maven-source-plugin.version>
		<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-javadoc-plugin -->
		<maven-javadoc-plugin.version>3.0.1</maven-javadoc-plugin.version>
		<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-gpg-plugin -->
		<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
		<!-- https://stackoverflow.com/a/35673586/1497139 -->
		<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-site-plugin -->
		<maven-site-plugin.version>3.7.1</maven-site-plugin.version>
		<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-project-info-reports-plugin -->
		<maven-project-info-reports-plugin.version>2.9</maven-project-info-reports-plugin.version>
		<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-surefire-report-plugin -->
		<maven-surefire-report-plugin.version>2.22.0</maven-surefire-report-plugin.version>
		<!--https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-jxr-plugin -->
		<maven-jxr-plugin.version>2.5</maven-jxr-plugin.version>
		<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-checkstyle-plugin -->
		<maven-checkstyle-plugin.version>3.0.0</maven-checkstyle-plugin.version>
		<!-- https://github.com/github/maven-plugins -->
		<site-maven-plugin.version>0.12</site-maven-plugin.version>

		<!-- versions of commonly used components -->
		<!-- https://mvnrepository.com/artifact/args4j/args4j -->
		<args4j.version>2.33</args4j.version>
		<!-- https://mvnrepository.com/artifact/junit/junit -->
		<junit4.version>4.12</junit4.version>
		<!-- https://mvnrepository.com/artifact/net.sourceforge.htmlcleaner/htmlcleaner -->
		<htmlcleaner.version>2.22</htmlcleaner.version>
		<!-- https://mvnrepository.com/artifact/commons-validator/commons-validator -->
		<commons-validator.version>1.6</commons-validator.version>
		<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
		<commons-io.version>2.6</commons-io.version>
		<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
		<commons-lang3.version>3.8</commons-lang3.version>
		<!-- https://mvnrepository.com/artifact/org.freemarker/freemarker/2.3.28 -->
		<freemarker.version>2.3.28</freemarker.version>
		<!-- https://mvnrepository.com/artifact/org.apache.pdfbox/pdfbox-lucene -->
		<pdfbox-lucene.version>1.8.15</pdfbox-lucene.version>

		<!-- unfortunately this line needs to be copied with cut&paste -->
		<dependency.locations.enabled>false</dependency.locations.enabled>
	</properties>
	<!-- candidates for dependencies to be used in child poms -->
	<dependencyManagement>
		<dependencies>
			<!-- commons io -->
			<dependency>
				<groupId>commons-io</groupId>
				<artifactId>commons-io</artifactId>
				<version>${commons-io.version}</version>
			</dependency>
			<!-- JUnit testing -->
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>${junit4.version}</version>
				<scope>test</scope>
			</dependency>
			<!-- args4j command line utility -->
			<dependency>
				<groupId>args4j</groupId>
				<artifactId>args4j</artifactId>
				<version>${args4j.version}</version>
			</dependency>
			<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
			<dependency>
				<groupId>org.apache.commons</groupId>
				<artifactId>commons-lang3</artifactId>
				<version>${commons-lang3.version}</version>
			</dependency>
		</dependencies>
	</dependencyManagement>
	<!-- see http://wiki.bitplan.com/index.php/Multi-Module_Maven_with_github_pages -->
	<distributionManagement>
		<site>
			<!-- Do mvn site site:stage -DstagingDirectory=/tmp/path first, then manually 
				add/push to the gh-pages branch on GitHub) -->
			<id>${project.artifactId}-site</id>
			<name>${github.owner} ${project.artifactId} ${project.version} GitHub Pages</name>
			<url>https://${github.owner}.github.io/${project.artifactId}</url> 
		</site>
	</distributionManagement>
	<build>
		<sourceDirectory>src/main/java</sourceDirectory>
		<testSourceDirectory>src/test/java</testSourceDirectory>
		<!-- see https://stackoverflow.com/questions/10483180/maven-what-is-pluginmanagement 
			plugins that child poms might use -->
		<pluginManagement>
			<plugins>
				<!-- git hub site plugin https://github.com/github/maven-plugins configured 
					for fixing the multi-module issue https://github.com/github/maven-plugins/issues/22 -->
				<plugin>
					<groupId>com.github.github</groupId>
					<artifactId>site-maven-plugin</artifactId>
					<version>${site-maven-plugin.version}</version>
					<configuration>
						<message>Creating site for ${github.owner} ${github.project}
							${project.version} with url ${project.url}</message>
						<repositoryName>${github.project}</repositoryName>    <!-- github repo name -->
						<repositoryOwner>${github.owner}</repositoryOwner>    <!-- github username -->
						<path>${github.site.path}</path>
						<merge>true</merge>
					</configuration>
					<executions>
						<execution>
							<goals>
								<goal>site</goal>
							</goals>
							<phase>site</phase>
						</execution>
					</executions>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<!-- http://code.mycila.com/license-maven-plugin/ -->
				<groupId>com.mycila.maven-license-plugin</groupId>
				<artifactId>maven-license-plugin</artifactId>
				<version>${com.mycila.maven-license-plugin.version}</version>
				<configuration>
					<header>src/etc/header.txt</header>
					<strictCheck>true</strictCheck>
					<includes>
						<include>src/**/*.java</include>
					</includes>
				</configuration>
			</plugin>
			<!-- Maven plugins -->
			<plugin>
				<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin -->
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>${maven-compiler-plugin.version}</version>
				<configuration>
					<source>${java.version}</source>
					<target>${java.version}</target>
				</configuration>
			</plugin>
			<!-- sure-fire (test) plugin https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-surefire-plugin -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>${maven-surefire-plugin.version}</version>
				<configuration>
					<excludes>
						<!-- JUnit4 TestSuites -->
						<exclude>**/TestSuite.java</exclude>
						<exclude>**/TestDebug.java</exclude>
					</excludes>
				</configuration>
			</plugin>
			<plugin>
				<!-- see http://central.sonatype.org/pages/apache-maven.html Javadoc 
					and Sources Attachments To get Javadoc and Source jar files generated, you 
					have to configure the javadoc and source Maven plugins. -->
				<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-no-fork</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>${maven-javadoc-plugin.version}</version>
				<configuration>
					<additionalparam>${javadoc.opts}</additionalparam>
					<!-- <additionalOptions>${javadoc.opts}</additionalOptions> -->
					<additionalJOption>${javadoc.opts}</additionalJOption>
					<overview>${basedir}\src\main\java\overview.html</overview>
					<!-- <verbose>true</verbose> -->
					<quiet>true</quiet>
				</configuration>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<!-- https://maven.apache.org/plugins/maven-site-plugin/ -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-site-plugin</artifactId>
				<version>${maven-site-plugin.version}</version>
				<!-- do not deploy (we need to get the result to gh-pages in the end) -->
				<configuration>
					<skipDeploy>true</skipDeploy>
				</configuration>
			</plugin>
			<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-project-info-reports-plugin -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-project-info-reports-plugin</artifactId>
				<version>${maven-project-info-reports-plugin.version}</version>
			</plugin>
			<!-- GPG Signed Components The Maven GPG plugin is used to sign the components 
				with the following configuration. -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-gpg-plugin</artifactId>
				<version>${maven-gpg-plugin.version}</version>
				<executions>
					<execution>
						<id>sign-artifacts</id>
						<phase>verify</phase>
						<goals>
							<goal>sign</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<!-- according to : http://central.sonatype.org/pages/apache-maven.html 
				Nexus Staging Maven Plugin for Deployment and Release The Nexus Staging Maven 
				Plugin is the recommended way to deploy your components to OSSRH and release 
				them to the Central Repository. To configure it simply add the plugin to 
				your Maven pom.xml. -->
			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<version>${nexus-staging-maven-plugin.version}</version>
				<extensions>true</extensions>
				<configuration>
					<serverId>ossrh</serverId>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
					<!-- set to true for automation -->
					<autoReleaseAfterClose>false</autoReleaseAfterClose>
				</configuration>
			</plugin>
		</plugins>
		<!-- https://issues.apache.org/jira/browse/MDEPLOY-177 https://stackoverflow.com/questions/33318793/how-to-fix-or-workaround-wagon-bug -->
		<extensions>
			<extension>
				<groupId>org.apache.maven.wagon</groupId>
				<artifactId>wagon-ssh</artifactId>
				<version>2.10</version>
			</extension>
		</extensions>
	</build>
	<reporting>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-project-info-reports-plugin</artifactId>
				<version>${maven-project-info-reports-plugin.version}</version>
				<configuration>
					<dependencyDetailsEnabled>true</dependencyDetailsEnabled>
					<dependencyLocationsEnabled>true</dependencyLocationsEnabled>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>${maven-javadoc-plugin.version}</version>
				<configuration>
					<overview>${basedir}\src\main\java\overview.html</overview>
					<!--<verbose>true</verbose> -->
					<quiet>true</quiet>
					<additionalJOption>${javadoc.opts}</additionalJOption>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-report-plugin</artifactId>
				<version>${maven-surefire-report-plugin.version}</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jxr-plugin</artifactId>
				<version>${maven-jxr-plugin.version}</version>
			</plugin>
		</plugins>
	</reporting>
</project>
