<?xml version="1.0"?>
<project
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<modelVersion>4.0.0</modelVersion>

	<parent>
		<groupId>de.alpharogroup</groupId>
		<artifactId>mvn-parent-projects</artifactId>
		<version>1.14.0</version>
	</parent>

	<artifactId>mvn-java-parent</artifactId>
	<version>2.30.0</version>
	<packaging>pom</packaging>
	<inceptionYear>2015</inceptionYear>

	<name>${project.artifactId}</name>

	<description>
		Parent project for general java projects.
	</description>

	<url>https://github.com/lightblueseas/mvn-java-parent</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>astrapi69</id>
			<name>Asterios Raptis</name>
			<email>astrapi69 at users.sf.net</email>
			<timezone>Berlin</timezone>
			<roles>
				<role>Project manager</role>
				<role>Developer</role>
			</roles>
		</developer>

	</developers>

	<organization>
		<name>Alpha Ro Group UG (haftungsbeschrängt)</name>
		<url>http://www.alpharogroup.de/</url>
	</organization>

	<scm>
		<connection>scm:git:git:@github.com:lightblueseas/mvn-java-parent.git</connection>
		<developerConnection>scm:git:git@github.com:lightblueseas/mvn-java-parent.git</developerConnection>
		<url>git:@github.com:lightblueseas/mvn-java-parent.git</url>
	</scm>

	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<name>Sonatype Nexus Snapshots</name>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>ossrh</id>
			<name>Nexus Release Repository</name>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>

	<ciManagement>
		<system>travis-ci</system>
		<url>https://travis-ci.org/lightblueseas/mvn-java-parent</url>
	</ciManagement>

	<issueManagement>
		<system>github</system>
		<url>https://github.com/lightblueseas/mvn-java-parent/issues</url>
	</issueManagement>

	<properties>
		<!-- LOMBOK version -->
		<lombok.version>1.16.18</lombok.version>
		<!-- LOGGING versions -->
		<slf4j.version>1.6.4</slf4j.version>
		<log4j.version>1.2.16</log4j.version>
		<!-- UNIT TEST versions -->
		<testng.version>6.11</testng.version>
		<junit.version>4.12</junit.version>
		<!-- JAVA-SEMVER versions -->
		<java-semver.version>0.9.0</java-semver.version>
		<!-- COM-SUN-TOOLS version -->
		<com.sun-tools.version>1.7.0.13</com.sun-tools.version>
		<system-path-of-tools-jar>${java.home}/../lib/tools.jar</system-path-of-tools-jar>
		<!-- JSR305 LIB version -->
		<jsr305.version>3.0.2</jsr305.version>
		<!-- JSR250-API LIB version -->
		<jsr250-api.version>1.0</jsr250-api.version>
		<!-- LICENSE-MAVEN-PLUGIN versions -->
		<license-maven-plugin.version>3.0</license-maven-plugin.version>
		<!-- MAVEN-SUREFIRE-PLUGIN versions -->
		<maven-surefire-plugin.version>2.20</maven-surefire-plugin.version>
		<!-- COVERAGE-MAVEN-PLUGIN versions -->
		<coveralls-maven-plugin.version>4.3.0</coveralls-maven-plugin.version>
		<cobertura-maven-plugin.version>2.7</cobertura-maven-plugin.version>
		<jacoco-maven-plugin.version>0.7.9</jacoco-maven-plugin.version>
		<maven-pmd-plugin.version>3.8</maven-pmd-plugin.version>
		<!-- PROPERTIES-MAVEN-PLUGIN versions -->
		<properties-maven-plugin.version>1.0.0</properties-maven-plugin.version>
		<!-- EXEC-MAVEN-PLUGIN versions -->
		<exec-maven-plugin.version>1.6.0</exec-maven-plugin.version>
		<!-- MAVEN-ANTRUN-PLUGIN versions -->
		<maven-antrun-plugin.version>1.8</maven-antrun-plugin.version>
		<!-- LOMBOK-MAVEN-PLUGIN versions -->
		<lombok-maven-plugin.version>1.16.18.1</lombok-maven-plugin.version>

	</properties>

	<dependencyManagement>

		<dependencies>

			<!-- LOMBOK DEPENDENCIES -->
			<dependency>
				<groupId>org.projectlombok</groupId>
				<artifactId>lombok</artifactId>
				<version>${lombok.version}</version>
			</dependency>
			<!-- LOGGING DEPENDENCIES -->
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-api</artifactId>
				<version>${slf4j.version}</version>
			</dependency>

			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-log4j12</artifactId>
				<version>${slf4j.version}</version>
			</dependency>

			<dependency>
				<groupId>log4j</groupId>
				<artifactId>log4j</artifactId>
				<version>${log4j.version}</version>
				<optional>true</optional>
			</dependency>
			<!-- UNIT DEPENDENCIES FOR TESTING -->
			<!-- JUNIT DEPENDENCY -->
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>${junit.version}</version>
			</dependency>
			<!-- TESTNG DEPENDENCY -->
			<dependency>
				<groupId>org.testng</groupId>
				<artifactId>testng</artifactId>
				<version>${testng.version}</version>
			</dependency>
			<!-- JAVA-SEMVER DEPENDENCIES -->
			<dependency>
				<groupId>com.github.zafarkhaja</groupId>
				<artifactId>java-semver</artifactId>
				<version>${java-semver.version}</version>
			</dependency>
			<!-- COM-SUN-TOOLS DEPENDENCIES -->
			<dependency>
				<groupId>com.sun</groupId>
				<artifactId>tools</artifactId>
				<version>${com.sun-tools.version}</version>
				<scope>system</scope>
				<systemPath>${system-path-of-tools-jar}</systemPath>
			</dependency>
			<!-- JSR305 DEPENDENCY -->
			<dependency>
				<groupId>com.google.code.findbugs</groupId>
				<artifactId>jsr305</artifactId>
				<version>${jsr305.version}</version>
			</dependency>
			<!-- JSR250-API DEPENDENCIES -->
			<dependency>
				<groupId>javax.annotation</groupId>
				<artifactId>jsr250-api</artifactId>
				<version>${jsr250-api.version}</version>
			</dependency>

		</dependencies>

	</dependencyManagement>

	<dependencies>
		<!-- LOMBOK DEPENDENCIES -->
		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
		</dependency>
		<!-- LOGGING DEPENDENCIES -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
		</dependency>

		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
		</dependency>
		<!-- LOGGING DEPENDENCIES - LOG4J -->
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
		</dependency>
		<!-- UNIT TESTS DEPENDENCIES -->
		<dependency>
			<groupId>org.testng</groupId>
			<artifactId>testng</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>

	</dependencies>

	<build>

		<resources>

			<resource>
				<filtering>false</filtering>
				<directory>src/main/java</directory>
				<includes>
					<include>**</include>
				</includes>
				<excludes>
					<exclude>**/*.java</exclude>
					<exclude>**/package.html</exclude>
				</excludes>
			</resource>

			<resource>
				<filtering>false</filtering>
				<directory>src/main/resources</directory>
			</resource>

			<resource>
				<filtering>false</filtering>
				<directory>src/site</directory>
			</resource>

		</resources>

		<testResources>

			<testResource>
				<filtering>false</filtering>
				<directory>src/test/java</directory>
				<includes>
					<include>**</include>
				</includes>
				<excludes>
					<exclude>**/*.java</exclude>
					<exclude>**/package.html</exclude>
				</excludes>
			</testResource>
			<testResource>
				<filtering>false</filtering>
				<directory>src/test/resources</directory>
			</testResource>

		</testResources>

		<pluginManagement>

			<plugins>

				<plugin>
					<groupId>com.mycila</groupId>
					<artifactId>license-maven-plugin</artifactId>
					<version>${license-maven-plugin.version}</version>
					<configuration>
						<header>src/main/resources/LICENSE.txt</header>
						<properties>
							<owner>Asterios Raptis</owner>
							<year>${project.inceptionYear}</year>
							<email>asterios.raptis@gmx.net</email>
						</properties>
						<excludes>
							<exclude>**/README</exclude>
							<exclude>**/README.md</exclude>
							<exclude>**/LICENSE</exclude>
							<exclude>**/NOTICE</exclude>
							<exclude>**/pom.xml</exclude>
							<exclude>**/*.xml</exclude>
							<exclude>**/*.xsl</exclude>
							<exclude>**/*.xsd</exclude>
							<exclude>**/*.dtd</exclude>
							<exclude>**/*.html</exclude>
							<exclude>**/*.jsp</exclude>
							<exclude>**/*.jpa</exclude>
							<exclude>**/*.sql</exclude>
							<exclude>**/*.properties</exclude>
							<exclude>**/*.bat</exclude>
							<exclude>**/*.gradle</exclude>
							<exclude>**/*.MF</exclude>
							<exclude>**/*.txt</exclude>
							<exclude>**/*.vm</exclude>
							<exclude>**/*.log</exclude>
							<exclude>**/*.map</exclude>
							<exclude>**/*.js.map</exclude>
							<exclude>**/*.tmpl</exclude>
							<exclude>**/*.js.tmpl</exclude>
							<exclude>**/*.editorconfig</exclude>
							<exclude>**/*.versionsBackup</exclude>
							<exclude>**/*.launch</exclude>
							<exclude>src/test/resources/**</exclude>
							<exclude>src/main/resources/**</exclude>
						</excludes>
					</configuration>
					<executions>
						<execution>
							<goals>
								<goal>format</goal>
							</goals>
						</execution>
					</executions>
				</plugin>

				<plugin>
					<inherited>true</inherited>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>${maven-surefire-plugin.version}</version>
				</plugin>

				<plugin>
					<inherited>true</inherited>
					<artifactId>maven-antrun-plugin</artifactId>
					<version>${maven-antrun-plugin.version}</version>
				</plugin>

				<plugin>
					<groupId>org.eluder.coveralls</groupId>
					<artifactId>coveralls-maven-plugin</artifactId>
					<version>${coveralls-maven-plugin.version}</version>
				</plugin>

				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>cobertura-maven-plugin</artifactId>
					<version>${cobertura-maven-plugin.version}</version>
					<configuration>
						<format>xml</format>
						<maxmem>256m</maxmem>
						<!-- aggregated reports for multi-module projects -->
						<aggregate>true</aggregate>
					</configuration>
				</plugin>

				<plugin>
					<groupId>org.jacoco</groupId>
					<artifactId>jacoco-maven-plugin</artifactId>
					<version>${jacoco-maven-plugin.version}</version>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-pmd-plugin</artifactId>
					<version>${maven-pmd-plugin.version}</version>
				</plugin>

				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>properties-maven-plugin</artifactId>
					<version>${properties-maven-plugin.version}</version>
				</plugin>
				<!--This plugin is used to execute java classes with a main method. -->
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>exec-maven-plugin</artifactId>
					<version>${exec-maven-plugin.version}</version>
					<executions>
						<execution>
							<phase>package</phase>
							<goals>
								<goal>java</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<!--This plugin is used to delombok lombokified java classes if this 
					is needed. -->
				<plugin>
					<groupId>org.projectlombok</groupId>
					<artifactId>lombok-maven-plugin</artifactId>
					<version>${lombok-maven-plugin.version}</version>
					<executions>
						<execution>
							<phase>generate-sources</phase>
							<goals>
								<goal>delombok</goal>
							</goals>
						</execution>
					</executions>
				</plugin>

			</plugins>

		</pluginManagement>

		<plugins>

			<plugin>
				<inherited>true</inherited>
				<artifactId>maven-compiler-plugin</artifactId>
			</plugin>

		</plugins>

	</build>

	<profiles>

		<profile>
			<id>release-sign-artifacts</id>
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<inherited>true</inherited>
						<artifactId>maven-gpg-plugin</artifactId>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<!-- This profile is for generate or update the license header from source 
				files. for generate or update the license header you have to run this profile 
				with this goal license:format. -->
			<id>update-license-header</id>
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<plugins>

					<plugin>
						<inherited>true</inherited>
						<groupId>com.mycila</groupId>
						<artifactId>license-maven-plugin</artifactId>
					</plugin>

				</plugins>
			</build>

		</profile>

		<profile>
			<id>release-javadoc-jar-with-dependencies</id>
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<plugins>

					<plugin>
						<inherited>true</inherited>
						<artifactId>maven-javadoc-plugin</artifactId>
					</plugin>

					<plugin>
						<inherited>true</inherited>
						<artifactId>maven-assembly-plugin</artifactId>
					</plugin>

				</plugins>
			</build>
		</profile>

		<profile>
			<id>generate-reports</id>
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<inherited>true</inherited>
						<artifactId>maven-javadoc-plugin</artifactId>
					</plugin>

					<plugin>
						<inherited>true</inherited>
						<artifactId>maven-surefire-plugin</artifactId>
					</plugin>

				</plugins>
			</build>
		</profile>

		<profile>
			<id>delombok-src</id>
			<!-- This profile can generate the classes(with all getter and setter 
				and other methods that provide lombok) that uses lombok annotations with 
				the maven-antrun-plugin. -->
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>

			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-antrun-plugin</artifactId>
						<executions>
							<execution>
								<id>delombok</id>
								<phase>generate-sources</phase>
								<configuration>
									<property environment="env" />
									<property name="antLombokVersion" value="${lombok.version}" />
									<target name="javadoc">
										<taskdef classname="lombok.delombok.ant.Tasks$Delombok"
											classpath="${env.HOME}/.m2/repository/org/projectlombok/lombok/${antLombokVersion}/lombok-${antLombokVersion}.jar"
											name="delombok" />
										<delombok verbose="true" encoding="UTF-8"
											to="target/generated-sources/delombok" from="src/main/java">
											<format value="suppressWarnings:skip" />
										</delombok>
									</target>
								</configuration>
								<goals>
									<goal>run</goal>
								</goals>
							</execution>
						</executions>
						<dependencies>
							<!-- LOMBOK DEPENDENCIES -->
							<dependency>
								<groupId>org.projectlombok</groupId>
								<artifactId>lombok</artifactId>
								<version>${lombok.version}</version>
							</dependency>
							<dependency>
								<groupId>com.sun</groupId>
								<artifactId>tools</artifactId>
								<version>${com.sun-tools.version}</version>
								<scope>system</scope>
								<systemPath>${system-path-of-tools-jar}</systemPath>
							</dependency>
						</dependencies>
					</plugin>
				</plugins>
			</build>

		</profile>

		<profile>
			<id>delombok-tests</id>
			<!-- This profile can generate the classes(with all getter and setter 
				and other methods that provide lombok) that uses lombok annotations with 
				the maven-antrun-plugin. -->
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>

			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-antrun-plugin</artifactId>
						<executions>
							<execution>
								<id>delombok</id>
								<phase>generate-sources</phase>
								<configuration>
									<property environment="env" />
									<property name="antLombokVersion" value="${lombok.version}" />
									<target name="javadoc">
										<taskdef classname="lombok.delombok.ant.Tasks$Delombok"
											classpath="${env.HOME}/.m2/repository/org/projectlombok/lombok/${antLombokVersion}/lombok-${antLombokVersion}.jar"
											name="delombok" />
										<delombok verbose="true" encoding="UTF-8"
											to="target/generated-sources/test-delombok" from="src/test/java">
											<format value="suppressWarnings:skip" />
										</delombok>
									</target>
								</configuration>
								<goals>
									<goal>run</goal>
								</goals>
							</execution>
						</executions>
						<dependencies>
							<!-- LOMBOK DEPENDENCIES -->
							<dependency>
								<groupId>org.projectlombok</groupId>
								<artifactId>lombok</artifactId>
								<version>${lombok.version}</version>
							</dependency>
							<dependency>
								<groupId>com.sun</groupId>
								<artifactId>tools</artifactId>
								<version>${com.sun-tools.version}</version>
								<scope>system</scope>
								<systemPath>${system-path-of-tools-jar}</systemPath>
							</dependency>
						</dependencies>
					</plugin>
				</plugins>
			</build>

		</profile>

	</profiles>

</project>
