<?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/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>cool.arch.infrastructure</groupId>
		<artifactId>infrastructure</artifactId>
		<version>1.0.0</version>
	</parent>
	<artifactId>base-pom</artifactId>
	<packaging>pom</packaging>
	<name>base-pom</name>
	<description>Base pom.xml file for providing baseline configuration for all CoolArch Maven projects.</description>
	<properties>
		<infrastructure.project.build.sourceEncoding>UTF-8</infrastructure.project.build.sourceEncoding>
		<infrastructure.java.source.version>1.8</infrastructure.java.source.version>
		<infrastructure.java.target.version>1.8</infrastructure.java.target.version>
		<infrastructure.lib.junit.version>4.12</infrastructure.lib.junit.version>
		<infrastructure.lib.mockito.version>1.10.19</infrastructure.lib.mockito.version>
		<infrastructure.plugin.lint.version>0.0.9</infrastructure.plugin.lint.version>
		<infrastructure.plugin.license.version>1.8</infrastructure.plugin.license.version>
		<infrastructure.plugin.license.id>apache2</infrastructure.plugin.license.id>
		<infrastructure.plugin.formatter.version>1.5.0</infrastructure.plugin.formatter.version>
		<skipITs>true</skipITs>
	</properties>
	<build>
		<plugins>
			<plugin>
				<groupId>com.lewisd</groupId>
				<artifactId>lint-maven-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.16</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-failsafe-plugin</artifactId>
				<version>2.18.1</version>
				<executions>
					<execution>
						<id>integration-test</id>
						<goals>
							<goal>integration-test</goal>
						</goals>
					</execution>
					<execution>
						<id>verify</id>
						<goals>
							<goal>verify</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<skip>${skipITs}</skip>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>license-maven-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>com.marvinformatics.formatter</groupId>
				<artifactId>formatter-maven-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<version>2.4.3</version>
				<configuration>
					<encoding>${project.build.sourceEncoding}</encoding>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>0.7.4.201502262128</version>
				<executions>
					<execution>
						<id>default-prepare-agent</id>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
					</execution>
					<execution>
						<id>default-prepare-agent-integration</id>
						<goals>
							<goal>prepare-agent-integration</goal>
						</goals>
					</execution>
					<execution>
						<id>default-report</id>
						<goals>
							<goal>report</goal>
						</goals>
					</execution>
					<execution>
						<id>default-report-integration</id>
						<goals>
							<goal>report-integration</goal>
						</goals>
					</execution>
					<execution>
						<id>default-check</id>
						<goals>
							<goal>check</goal>
						</goals>
						<configuration>
							<rules>
								<!-- implmentation is needed only for Maven 2 -->
								<rule implementation="org.jacoco.maven.RuleConfiguration">
									<element>BUNDLE</element>
									<limits>
										<!-- implmentation is needed only for Maven 2 -->
										<limit implementation="org.jacoco.report.check.Limit">
											<counter>COMPLEXITY</counter>
											<value>COVEREDRATIO</value>
											<minimum>0.60</minimum>
										</limit>
									</limits>
								</rule>
							</rules>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.2</version>
					<configuration>
						<source>${infrastructure.java.source.version}</source>
						<target>${infrastructure.java.target.version}</target>
						<showDeprecation>true</showDeprecation>
						<encoding>${project.build.sourceEncoding}</encoding>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>license-maven-plugin</artifactId>
					<version>${infrastructure.plugin.license.version}</version>
					<configuration>
						<licenseName>${infrastructure.plugin.license.id}</licenseName>
						<licenseResolver>classpath://license/resolver</licenseResolver>
						<includes>
							<include>**/*.java</include>
						</includes>
						<roots>
							<root>src/main/java</root>
							<root>src/test/java</root>
							<root>src/main/resources</root>
							<root>src/test/resources</root>
						</roots>
						<failOnMissingHeader>true</failOnMissingHeader>
					</configuration>
					<executions>
						<execution>
							<id>license-maven-plugin-check-file-header</id>
							<goals>
								<goal>check-file-header</goal>
							</goals>
							<phase>verify</phase>
						</execution>
					</executions>
					<dependencies>
						<dependency>
							<groupId>cool.arch.infrastructure</groupId>
							<artifactId>licenses</artifactId>
							<version>1.0.0</version>
						</dependency>
					</dependencies>
				</plugin>
				<plugin>
					<groupId>com.lewisd</groupId>
					<artifactId>lint-maven-plugin</artifactId>
					<version>${infrastructure.plugin.lint.version}</version>
					<executions>
						<execution>
							<id>lint-maven-plugin-validate-check</id>
							<goals>
								<goal>check</goal>
							</goals>
							<phase>validate</phase>
						</execution>
					</executions>
					<dependencies>
						<!-- Remove override as soon as lint plugin bumps to this dep version -->
						<dependency>
							<groupId>commons-validator</groupId>
							<artifactId>commons-validator</artifactId>
							<version>1.4.1</version>
						</dependency>
					</dependencies>
				</plugin>
				<plugin>
					<groupId>com.marvinformatics.formatter</groupId>
					<artifactId>formatter-maven-plugin</artifactId>
					<version>${infrastructure.plugin.formatter.version}</version>
					<executions>
						<execution>
							<id>formatter-maven-plugin-validate</id>
							<goals>
								<goal>validate</goal>
							</goals>
							<phase>validate</phase>
						</execution>
					</executions>
					<configuration>
						<aggregator>true</aggregator>
						<basedir>${baseDir}</basedir>
						<sourceDirectory>./</sourceDirectory>
						<excludes>
							<exclude>**/target/**</exclude>
						</excludes>
						<encoding>${infrastructure.project.build.sourceEncoding}</encoding>
						<aggregator>true</aggregator>
						<lineEnding>LF</lineEnding>
						<configFile>classpath:/cool/arch/infrastructure/codequality/formatter/java.xml</configFile>
						<configJsFile>classpath:/cool/arch/infrastructure/codequality/formatter/javascript.xml</configJsFile>
					</configuration>
					<dependencies>
						<dependency>
							<groupId>cool.arch.infrastructure</groupId>
							<artifactId>formatter-java</artifactId>
							<version>1.0.0</version>
						</dependency>
						<dependency>
							<groupId>cool.arch.infrastructure</groupId>
							<artifactId>formatter-javascript</artifactId>
							<version>1.0.0</version>
						</dependency>
					</dependencies>
				</plugin>
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.glassfish.hk2</groupId>
										<artifactId>hk2-inhabitant-generator</artifactId>
										<versionRange>[2.4.0-b10,)</versionRange>
										<goals>
											<goal>generate-inhabitants</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<execute>
											<runOnIncremental>true</runOnIncremental>
										</execute>
									</action>
								</pluginExecution>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>com.lewisd</groupId>
										<artifactId>lint-maven-plugin</artifactId>
										<versionRange>[0.0.8,)</versionRange>
										<goals>
											<goal>check</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.apache.maven.plugins</groupId>
										<artifactId>maven-enforcer-plugin</artifactId>
										<versionRange>[1.2,)</versionRange>
										<goals>
											<goal>enforce</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>com.marvinformatics.formatter</groupId>
										<artifactId>formatter-maven-plugin</artifactId>
										<versionRange>[1.5.0,)</versionRange>
										<goals>
											<goal>validate</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>
	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>${infrastructure.lib.junit.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.mockito</groupId>
				<artifactId>mockito-all</artifactId>
				<version>${infrastructure.lib.mockito.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.mockito</groupId>
				<artifactId>mockito-core</artifactId>
				<version>${infrastructure.lib.mockito.version}</version>
				<scope>test</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>
</project>