<?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>de.enterprise-starters</groupId>
	<artifactId>enterprise-starter-parent</artifactId>
	<version>2.2.0-alpha4</version>
	<name>Enterprise Spring Boot Starter Parent</name>
	<parent>
		<groupId>de.enterprise-starters</groupId>
		<artifactId>enterprise-dependencies</artifactId>
		<version>2.2.0-alpha4</version>
		<relativePath>../enterprise-dependencies/pom.xml</relativePath>
	</parent>

	<packaging>pom</packaging>
	<description>Enterprise Starter Parent</description>
	
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<argLine>-Dfile.encoding=UTF-8</argLine><!-- used by jacoco -->
		<jacoco.rule.complexity.coveredratio>0.900</jacoco.rule.complexity.coveredratio>
	</properties>
	
	<dependencies>
		<dependency>
			<groupId>de.enterprise-starters</groupId>
			<artifactId>enterprise-common</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-test</artifactId>
			<scope>test</scope>
			<exclusions>
				<exclusion>
					<groupId>junit</groupId>
					<artifactId>junit</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.junit.vintage</groupId>
					<artifactId>junit-vintage-engine</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-configuration-processor</artifactId>
			<optional>true</optional>
		</dependency>
	</dependencies>

	<reporting>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>findbugs-maven-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-pmd-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<reportSets>
					<reportSet>
						<reports>
							<report>checkstyle</report>
						</reports>
					</reportSet>
				</reportSets>
				<configuration>
					<skip>${disable.checks}</skip>
					<configLocation>checkstyle/checkstyle.xml</configLocation>
					<suppressionsLocation>checkstyle/checkstyle-suppressions.xml</suppressionsLocation>
					<propertyExpansion>checkstyle.build.directory=${project.build.directory}</propertyExpansion>
					<encoding>UTF-8</encoding>
					<consoleOutput>true</consoleOutput>
					<failOnViolation>true</failOnViolation>
					<includeTestSourceDirectory>true</includeTestSourceDirectory>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<reportSets>
					<reportSet>
						<reports>
							<!-- select non-aggregate reports -->
							<report>report</report>
						</reports>
					</reportSet>
				</reportSets>
			</plugin>
		</plugins>
	</reporting>

	<profiles>
		<profile>
			<id>build</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.jacoco</groupId>
						<artifactId>jacoco-maven-plugin</artifactId>
						<executions>
							<execution>
								<id>default-prepare-agent</id>
								<goals>
									<goal>prepare-agent</goal>
								</goals>
							</execution>
							<execution>
								<id>default-report</id>
								<phase>prepare-package</phase>
								<goals>
									<goal>report</goal>
								</goals>
								<configuration>
									<!-- exclude querydsl autogenerated classes -->
									<excludes>
										<exclude>**.Q*</exclude>
										<exclude>**/Q*</exclude>
									</excludes>
								</configuration>
							</execution>
							<execution>
								<id>default-check</id>
								<goals>
									<goal>check</goal>
								</goals>
								<configuration>
									<excludes>
										<exclude>**.Q*</exclude>
										<exclude>**/Q*</exclude>
									</excludes>
									<rules>
										<!-- implementation is needed only for Maven 2 -->
										<rule implementation="org.jacoco.maven.RuleConfiguration">
											<element>BUNDLE</element>
											<limits>
												<!-- implementation is needed only for Maven 2 -->
												<limit implementation="org.jacoco.report.check.Limit">
													<counter>COMPLEXITY</counter>
													<value>COVEREDRATIO</value>
													<minimum>${jacoco.rule.complexity.coveredratio}</minimum>
												</limit>
											</limits>
										</rule>
									</rules>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-checkstyle-plugin</artifactId>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-pmd-plugin</artifactId>
					</plugin>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>versions-maven-plugin</artifactId>
						<version>2.4</version>
						<configuration>
							<processDependencyManagement>false</processDependencyManagement>
							<processParent>true</processParent>
							<includes>
								<include>de.enterprise:*</include>
							</includes>
							<updateDependencies>true</updateDependencies>
							<updatePropertyVersions>true</updatePropertyVersions>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>

	</profiles>
</project>
