<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.greenrobot</groupId>
	<artifactId>parent-pom-with-checks</artifactId>
    <version>2.0.0</version>
	<packaging>pom</packaging>

	<parent>
		<groupId>de.greenrobot</groupId>
		<artifactId>parent-pom</artifactId>
		<version>2.0.0</version>
		<relativePath>parent-pom.xml</relativePath>
	</parent>

	<properties>
		<findbugs-version>3.0.0</findbugs-version>
		<checkstyle-version>2.13</checkstyle-version>
		<checkstyle-rules-version>2.0.0</checkstyle-rules-version>
	</properties>

	<build>
		<plugins>
			<!-- http://maven.apache.org/plugins/maven-checkstyle-plugin/check-mojo.html -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<version>${checkstyle-version}</version>
				<dependencies>
					<dependency>
						<groupId>de.greenrobot</groupId>
						<artifactId>checkstyle-rules</artifactId>
						<version>${checkstyle-rules-version}</version>
					</dependency>
				</dependencies>
				<configuration>
					<configLocation>checkstyle-greenrobot.xml</configLocation>
					<consoleOutput>true</consoleOutput>
					<maxAllowedViolations>10</maxAllowedViolations>
				</configuration>
				<executions>
					<execution>
						<phase>verify</phase>
						<goals>
							<goal>check</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- http://mojo.codehaus.org/findbugs-maven-plugin/check-mojo.html -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>findbugs-maven-plugin</artifactId>
				<version>${findbugs-version}</version>
				<configuration>
					<!-- Bug Rank - bugs are given a rank 1-20: -->
					<!-- scariest (rank 1-4), scary (rank 5-9), troubling (rank 10-14), 
						and of concern (rank 15-20) -->
					<maxRank>14</maxRank>
					<xmlOutput>true</xmlOutput>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>check</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<reporting>
		<plugins>
			<!-- http://maven.apache.org/plugins/maven-checkstyle-plugin/checkstyle-mojo.html -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<version>${checkstyle-version}</version>
				<configuration>
					<configLocation>checkstyle-greenrobot.xml</configLocation>
				</configuration>
			</plugin>

			<!-- http://mojo.codehaus.org/findbugs-maven-plugin/findbugs-mojo.html -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>findbugs-maven-plugin</artifactId>
				<version>${findbugs-version}</version>
			</plugin>
		</plugins>
	</reporting>

    <name>greenrobot-common's parent POM with checks</name>
    <description>Some defaults for Maven builds including checks for Java code (currently Checkstyle and FindBugs)</description>

</project>