<?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.0.0</version>
	</parent>

	<artifactId>mvn-java-parent</artifactId>
	<packaging>pom</packaging>
	<version>2.0.0</version>

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

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

	<properties>
		<!-- LOMBOK version -->
		<lombok.version>1.16.6</lombok.version>
		<!-- LOGGING versions -->
		<slf4j.version>1.6.4</slf4j.version>
		<log4j.version>1.2.16</log4j.version>
		<!-- UNIT TEST versions -->
		<testng.version>6.9.4</testng.version>
		<junit.version>4.12</junit.version>	
		<!-- LICENSE MAVEN PLUGIN versions -->
		<license-maven-plugin.version>2.8</license-maven-plugin.version>
		<!-- MAVEN SUREFIRE PLUGIN versions -->
		<maven-surefire-plugin.version>2.18.1</maven-surefire-plugin.version>
		<!-- COVERAGE MAVEN PLUGIN versions -->
		<coveralls-maven-plugin.version>3.0.1</coveralls-maven-plugin.version>
		<cobertura-maven-plugin.version>2.6</cobertura-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>

		</dependencies>

	</dependencyManagement>


	<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>**/pom.xml</exclude>
							<exclude>**/*.xml</exclude>
							<exclude>**/*.xsl</exclude>
							<exclude>**/*.xsd</exclude>
							<exclude>**/*.dtd</exclude>
							<exclude>**/*.html</exclude>
							<exclude>**/*.properties</exclude>
							<exclude>**/*.bat</exclude>
							<exclude>**/*.gradle</exclude>
							<exclude>**/*.MF</exclude>
							<exclude>**/*.txt</exclude>
							<exclude>**/*.vm</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>
					<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>

			</plugins>

		</pluginManagement>

		<plugins>

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

		</plugins>

	</build>

	<repositories>

		<repository>
			<id>Apache Nexus</id>
			<url>https://repository.apache.org/content/repositories/snapshots/</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</repository>

		<repository>
			<id>Sonatype Public</id>
			<name>Sonatype Public Repository</name>
			<url>http://repository.sonatype.org/content/groups/public</url>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</repository>

		<repository>
			<id>Sonatype Release</id>
			<name>Sonatype Release Repository</name>
			<url>http://oss.sonatype.org/content/repositories/releases</url>
		</repository>

		<repository>
			<id>Sonatype Snapshots</id>
			<name>Sonatype Snapshots Repository</name>
			<url>http://oss.sonatype.org/content/repositories/snapshots</url>
		</repository>

	</repositories>

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

	</profiles>

	<modules>
		<module>mvn-persistence-parent</module>
	</modules>
</project>
