<?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>nl.pvanassen</groupId>
	<artifactId>parent</artifactId>
	<version>2.0.0</version>
	<packaging>pom</packaging>
	<name>Parent pom</name>
	<description>Parent pom for projects by Paul van Assen</description>
	<url>http://www.pvanassen.nl</url>

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

	<developers>
		<developer>
			<id>pvanassen</id>
			<name>Paul van Assen</name>
			<email>source@pvanassen.nl</email>
		</developer>
	</developers>

	<scm>
		<connection>scm:git:git@github.com:pvanassen/parent.git</connection>
		<developerConnection>scm:git:git@github.com:pvanassen/parent.git</developerConnection>
		<tag>HEAD</tag>
		<url>https://github.com/pvanassen/parent</url>
	</scm>

	<properties>
		<java.version>1.8</java.version>
		<scala.version>2.11</scala.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<sonatypeOssDistMgmtSnapshotsUrl>https://oss.sonatype.org/content/repositories/snapshots/</sonatypeOssDistMgmtSnapshotsUrl>
		<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
		<sortpom-maven-plugin.version>2.10.0</sortpom-maven-plugin.version>
		<maven-assembly-plugin.version>3.1.0</maven-assembly-plugin.version>
		<maven-clean-plugin.version>3.1.0</maven-clean-plugin.version>
		<maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
        <maven-dependency-plugin.version>3.1.1</maven-dependency-plugin.version>
		<maven-deploy-plugin.version>3.0.0-M1</maven-deploy-plugin.version>
		<maven-install-plugin.version>3.0.0-M1</maven-install-plugin.version>
		<maven-jar-plugin.version>3.1.0</maven-jar-plugin.version>
		<maven-javadoc-plugin.version>3.0.1</maven-javadoc-plugin.version>
		<maven-resources-plugin.version>3.1.0</maven-resources-plugin.version>
		<maven-site-plugin.version>3.7.1</maven-site-plugin.version>
		<maven-source-plugin.version>3.0.1</maven-source-plugin.version>
		<maven-surefire-plugin.version>3.0.0-M1</maven-surefire-plugin.version>
		<maven-war-plugin.version>3.2.2</maven-war-plugin.version>
		<versions-maven-plugin.version>2.7</versions-maven-plugin.version>
		<lifecycle-mapping.version>1.0.0</lifecycle-mapping.version>
        <coveralls-maven-plugin.version>4.3.0</coveralls-maven-plugin.version>
		<jacoco-maven-plugin.version>0.8.2</jacoco-maven-plugin.version>
		<nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
		<maven-enforcer-plugin.version>3.0.0-M2</maven-enforcer-plugin.version>
		<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
		<groovydoc-maven-plugin.version>2.1</groovydoc-maven-plugin.version>
		<groovy-eclipse-batch.version>2.3.7-01</groovy-eclipse-batch.version>
		<groovy-eclipse-compiler.version>2.9.2-01</groovy-eclipse-compiler.version>
		<build-helper-maven-plugin.version>3.0.0</build-helper-maven-plugin.version>
		<codenarc-maven-plugin.version>0.22-1</codenarc-maven-plugin.version>
		<scala-maven-plugin.version>3.3.1</scala-maven-plugin.version>
		<scalatest-maven-plugin.version>2.0.0</scalatest-maven-plugin.version>
	</properties>

	<repositories>
		<repository>
			<id>sonatype-nexus-snapshots</id>
			<name>Sonatype Nexus Snapshots</name>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</repository>
	</repositories>


	<distributionManagement>
		<snapshotRepository>
			<id>sonatype-nexus-snapshots</id>
			<name>Sonatype Nexus Snapshots</name>
			<url>${sonatypeOssDistMgmtSnapshotsUrl}</url>
		</snapshotRepository>
		<repository>
			<id>sonatype-nexus-staging</id>
			<name>Nexus Release Repository</name>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-release-plugin</artifactId>
					<version>${maven-release-plugin.version}</version>
					<configuration>
						<mavenExecutorId>forked-path</mavenExecutorId>
						<useReleaseProfile>false</useReleaseProfile>
						<arguments>${arguments} -Psonatype-oss-release</arguments>
					</configuration>
				</plugin>
				<plugin>
					<groupId>com.github.ekryd.sortpom</groupId>
					<artifactId>sortpom-maven-plugin</artifactId>
					<version>${sortpom-maven-plugin.version}</version>
				</plugin>
				<plugin>
					<artifactId>maven-assembly-plugin</artifactId>
					<version>${maven-assembly-plugin.version}</version>
				</plugin>
				<plugin>
					<artifactId>maven-clean-plugin</artifactId>
					<version>${maven-clean-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>${maven-compiler-plugin.version}</version>
				</plugin>
				<plugin>
					<artifactId>maven-dependency-plugin</artifactId>
					<version>${maven-dependency-plugin.version}</version>
				</plugin>
				<plugin>
					<artifactId>maven-deploy-plugin</artifactId>
					<version>${maven-deploy-plugin.version}</version>
				</plugin>
				<plugin>
					<artifactId>maven-install-plugin</artifactId>
					<version>${maven-install-plugin.version}</version>
				</plugin>
				<plugin>
					<artifactId>maven-jar-plugin</artifactId>
					<version>${maven-jar-plugin.version}</version>
					<configuration>
						<archive>
							<index>true</index>
							<manifest>
								<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
								<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
							</manifest>
						</archive>
					</configuration>
				</plugin>
				<plugin>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>${maven-javadoc-plugin.version}</version>
					<configuration>
						<excludePackageNames>repack.*</excludePackageNames>
					</configuration>
				</plugin>
				<plugin>
					<artifactId>maven-resources-plugin</artifactId>
					<version>${maven-resources-plugin.version}</version>
				</plugin>
				<plugin>
					<artifactId>maven-site-plugin</artifactId>
					<version>${maven-site-plugin.version}</version>
				</plugin>
				<plugin>
					<artifactId>maven-source-plugin</artifactId>
					<version>${maven-source-plugin.version}</version>
				</plugin>
				<plugin>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>${maven-surefire-plugin.version}</version>
				</plugin>
				<plugin>
					<artifactId>maven-war-plugin</artifactId>
					<version>${maven-war-plugin.version}</version>
					<configuration>
						<archive>
							<index>true</index>
							<manifest>
								<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
								<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
							</manifest>
						</archive>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>versions-maven-plugin</artifactId>
					<version>${versions-maven-plugin.version}</version>
				</plugin>
				<!--This plugin's configuration is used to store Eclipse m2e settings
                    only. It has no influence on the Maven build itself. -->
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>${lifecycle-mapping.version}</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.jacoco</groupId>
										<artifactId>jacoco-maven-plugin</artifactId>
										<versionRange>[0.7.4.201502262128,)</versionRange>
										<goals>
											<goal>prepare-agent</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.eluder.coveralls</groupId>
					<artifactId>coveralls-maven-plugin</artifactId>
					<version>${coveralls-maven-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.jacoco</groupId>
					<artifactId>jacoco-maven-plugin</artifactId>
					<version>${jacoco-maven-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.sonatype.plugins</groupId>
					<artifactId>nexus-staging-maven-plugin</artifactId>
					<version>${nexus-staging-maven-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-enforcer-plugin</artifactId>
					<version>${maven-enforcer-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-gpg-plugin</artifactId>
					<version>${maven-gpg-plugin.version}</version>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<groupId>com.github.ekryd.sortpom</groupId>
				<artifactId>sortpom-maven-plugin</artifactId>
				<configuration>
					<encoding>${project.build.sourceEncoding}</encoding>
					<keepBlankLines>true</keepBlankLines>
					<lineSeparator>\n</lineSeparator>
					<nrOfIndentSpace>-1</nrOfIndentSpace>
					<sortDependencies>groupId,artifactId</sortDependencies>
					<sortPlugins>groupId,artifactId</sortPlugins>
					<sortProperties>true</sortProperties>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>${java.version}</source>
					<target>${java.version}</target>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>analyze-only</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-enforcer-plugin</artifactId>
				<executions>
					<execution>
						<id>default-cli</id>
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
							<rules>
								<requireReleaseDeps>
									<message>No Snapshots Allowed!</message>
									<onlyWhenRelease>true</onlyWhenRelease>
								</requireReleaseDeps>
								<reactorModuleConvergence>
									<message>The reactor is not valid</message>
								</reactorModuleConvergence>
								<enforceImportRelease implementation="com.synedge.enforcer.EnforceImportRelease"></enforceImportRelease>
                                <requireMavenVersion>
                                    <version>(,2.1.0),(2.1.0,2.2.0),(2.2.0,)</version>
                                    <message>Maven 2.1.0 and 2.2.0 produce incorrect GPG signatures and checksums respectively.</message>
                                </requireMavenVersion>
							</rules>
							<fail>true</fail>
						</configuration>
					</execution>
				</executions>
				<dependencies>
					<dependency>
						<groupId>com.synedge.oss.enforcer</groupId>
						<artifactId>enforce-import-release</artifactId>
						<version>1.0.2</version>
					</dependency>
				</dependencies>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-gpg-plugin</artifactId>
				<executions>
					<execution>
						<id>sign-artifacts</id>
						<phase>verify</phase>
						<goals>
							<goal>sign</goal>
						</goals>
                        <configuration>
                            <gpgArguments>
                                <arg>--pinentry-mode</arg>
                                <arg>loopback</arg>
                            </gpgArguments>
                        </configuration>
                    </execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-source-plugin</artifactId>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>versions-maven-plugin</artifactId>
				<configuration>
					<includes>
						<include>*</include>
					</includes>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.eluder.coveralls</groupId>
				<artifactId>coveralls-maven-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>jacoco-initialize</id>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
					</execution>
					<execution>
						<id>jacoco-site</id>
						<phase>package</phase>
						<goals>
							<goal>report</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<destFile>${project.build.directory}/jacoco.exec</destFile>
					<dataFile>${project.build.directory}/jacoco.exec</dataFile>
				</configuration>
			</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>
		</plugins>
	</build>
	<profiles>
		<profile>
			<id>java</id>
			<activation>
				<file>
					<exists>${basedir}/src/main/java</exists>
				</file>
			</activation>
			<build>
				<plugins>
					<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>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>groovy</id>
			<activation>
				<file>
					<exists>${basedir}/src/main/groovy</exists>
				</file>
			</activation>
			<build>
				<pluginManagement>
					<plugins>
						<plugin>
							<groupId>com.bluetrainsoftware.maven</groupId>
							<artifactId>groovydoc-maven-plugin</artifactId>
							<version>${groovydoc-maven-plugin.version}</version>
							<executions>
								<execution>
									<id>attach-docs</id>
									<phase>package</phase>
									<goals>
										<goal>attach-docs</goal>
									</goals>
								</execution>
							</executions>
						</plugin>
						<plugin>
							<artifactId>maven-compiler-plugin</artifactId>
							<version>${maven-compiler-plugin.version}</version>
							<dependencies>
								<dependency>
									<groupId>org.codehaus.groovy</groupId>
									<artifactId>groovy-eclipse-batch</artifactId>
									<version>${groovy-eclipse-batch.version}</version>
								</dependency>
								<dependency>
									<groupId>org.codehaus.groovy</groupId>
									<artifactId>groovy-eclipse-compiler</artifactId>
									<version>${groovy-eclipse-compiler.version}</version>
								</dependency>
							</dependencies>
							<configuration>
								<compilerId>groovy-eclipse-compiler</compilerId>
							</configuration>
						</plugin>
						<plugin>
							<groupId>org.codehaus.groovy</groupId>
							<artifactId>groovy-eclipse-compiler</artifactId>
							<version>${groovy-eclipse-compiler.version}</version>
							<extensions>true</extensions>
						</plugin>
						<plugin>
							<groupId>org.codehaus.mojo</groupId>
							<artifactId>build-helper-maven-plugin</artifactId>
							<version>${build-helper-maven-plugin.version}</version>
							<executions>
								<execution>
									<id>add-source</id>
									<phase>generate-sources</phase>
									<goals>
										<goal>add-source</goal>
									</goals>
									<configuration>
										<sources>
											<source>src/main/groovy</source>
										</sources>
									</configuration>
								</execution>
								<execution>
									<id>add-test-source</id>
									<phase>generate-test-sources</phase>
									<goals>
										<goal>add-test-source</goal>
									</goals>
									<configuration>
										<sources>
											<source>src/test/groovy</source>
										</sources>
									</configuration>
								</execution>
							</executions>
						</plugin>
						<plugin>
							<groupId>org.codehaus.mojo</groupId>
							<artifactId>codenarc-maven-plugin</artifactId>
							<version>${codenarc-maven-plugin.version}</version>
							<configuration>
								<sourceDirectory>src/main/groovy</sourceDirectory>
							</configuration>
						</plugin>
					</plugins>
				</pluginManagement>
				<plugins>
					<plugin>
						<groupId>com.bluetrainsoftware.maven</groupId>
						<artifactId>groovydoc-maven-plugin</artifactId>
					</plugin>
					<plugin>
						<artifactId>maven-compiler-plugin</artifactId>
						<configuration>
							<source>${java.version}</source>
							<target>${java.version}</target>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.codehaus.groovy</groupId>
						<artifactId>groovy-eclipse-compiler</artifactId>
					</plugin>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>build-helper-maven-plugin</artifactId>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>scala</id>
			<activation>
				<file>
					<exists>${basedir}/src/main/scala</exists>
				</file>
			</activation>
			<build>
				<plugins>
					<plugin>
						<!-- see http://davidb.github.com/scala-maven-plugin -->
						<groupId>net.alchim31.maven</groupId>
						<artifactId>scala-maven-plugin</artifactId>
						<version>${scala-maven-plugin.version}</version>
						<executions>
							<execution>
								<goals>
									<goal>compile</goal>
									<goal>testCompile</goal>
								</goals>
								<configuration>
									<args>
										<arg>-make:transitive</arg>
										<arg>-dependencyfile</arg>
										<arg>${project.build.directory}/.scala_dependencies</arg>
									</args>
									<scalaCompatVersion>${scala.version}</scalaCompatVersion>
								</configuration>
							</execution>
						</executions>
					</plugin>

					<!-- "package" command plugin -->
					<plugin>
						<artifactId>maven-assembly-plugin</artifactId>
						<executions>
							<execution>
								<id>make-assembly</id>
								<phase>package</phase>
								<goals>
									<goal>single</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<descriptorRefs>
								<descriptorRef>jar-with-dependencies</descriptorRef>
							</descriptorRefs>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-plugin</artifactId>
						<configuration>
							<skipTests>true</skipTests>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.scalatest</groupId>
						<artifactId>scalatest-maven-plugin</artifactId>
						<version>${scalatest-maven-plugin.version}</version>
						<executions>
							<execution>
								<id>test</id>
								<goals>
									<goal>test</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
							<junitxml>.</junitxml>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>build-helper-maven-plugin</artifactId>
						<version>${build-helper-maven-plugin.version}</version>
						<executions>
							<execution>
								<id>add-source</id>
								<phase>generate-sources</phase>
								<goals>
									<goal>add-source</goal>
								</goals>
								<configuration>
									<sources>
										<source>src/main/scala</source>
									</sources>
								</configuration>
							</execution>
							<execution>
								<id>add-test-source</id>
								<phase>generate-test-sources</phase>
								<goals>
									<goal>add-test-source</goal>
								</goals>
								<configuration>
									<sources>
										<source>src/test/scala</source>
									</sources>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
			<properties>
				<src.dir>src/main/scala</src.dir>
				<test.dir>src/test/scala</test.dir>
			</properties>
		</profile>
		<profile>
			<id>sonatype-oss-release</id>
			<build>
				<plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-enforcer-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>default-cli</id>
                                <goals>
                                    <goal>enforce</goal>
                                </goals>
                                <phase>verify</phase>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
						<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>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<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>
                                <configuration>
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
