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

	<parent>
		<groupId>org.sonatype.oss</groupId>
		<artifactId>oss-parent</artifactId>
		<version>7</version>
	</parent>

	<modelVersion>4.0.0</modelVersion>
	<groupId>com.codereligion</groupId>
	<artifactId>codereligion-reflect</artifactId>
	<version>0.1.0</version>

	<name>Reflect</name>
	<description>Provides convenience methods for working with java beans introspection.</description>
	<url>https://github.com/codereligion/reflect</url>

	<developers>
		<developer>
			<id>SierraGolf</id>
			<name>Sebastian Gröbler</name>
		</developer>
		<developer>
			<id>whiskeysierra</id>
			<name>Willi Schönborn</name>
		</developer>
	</developers>

	<scm>
		<url>scm:git:ssh://git@github.com:codereligion/reflect.git</url>
		<connection>scm:git:ssh://git@github.com:codereligion/reflect.git</connection>
		<developerConnection>scm:git:git@github.com:codereligion/reflect.git</developerConnection>
	  <tag>codereligion-reflect-0.1.0</tag>
  </scm>

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

	<prerequisites>
		<maven>3.0</maven>
	</prerequisites>

	<properties>
		<!-- basic maven properties -->
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<resources.plugin.version>2.6</resources.plugin.version>
		<gmaven.plugin.version>1.4</gmaven.plugin.version>
		<compiler.plugin.version>3.1</compiler.plugin.version>
		<surefire.plugin.version>2.15</surefire.plugin.version>
		<license.plugin.version>1.9.0</license.plugin.version>
		<source.plugin.version>2.2.1</source.plugin.version>
		<javadoc.plugin.version>2.9.1</javadoc.plugin.version>
		<release.plugin.version>2.4.1</release.plugin.version>
		<build.helper.plugin.version>1.8</build.helper.plugin.version>

		<!-- dependency versions -->
		<guava.version>14.0.1</guava.version>
		<jsr305.version>2.0.1</jsr305.version>
		<junit.version>4.11</junit.version>
		<hamcrest.version>1.3</hamcrest.version>
		<mockito.version>1.9.5</mockito.version>

		<!-- code coverage properties -->
		<jacoco.version>0.6.2.201302030002</jacoco.version>
		<skip.code.coverage>true</skip.code.coverage>
	</properties>

	<build>

		<plugins>

			<!-- add example folder to test-sources -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<version>${build.helper.plugin.version}</version>
				<executions>
					<execution>
						<id>add-source</id>
						<phase>generate-sources</phase>
						<goals>
							<goal>add-test-source</goal>
						</goals>
						<configuration>
							<sources>
								<source>${project.basedir}/src/example/java</source>
							</sources>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<!-- read Example.java into property -->
			<plugin>
				<groupId>org.codehaus.gmaven</groupId>
				<artifactId>gmaven-plugin</artifactId>
				<version>${gmaven.plugin.version}</version>
				<configuration>
					<properties>
						<examplePath>${project.basedir}/src/example/java/com/codereligion/example/Example.java</examplePath>
					</properties>
					<source>
						project.properties.example = new
						File(project.properties.examplePath).getText()
					</source>
				</configuration>
				<executions>
					<execution>
						<phase>process-resources</phase>
						<goals>
							<goal>execute</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- copy resources and replace variables -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<version>${resources.plugin.version}</version>
				<configuration>
					<outputDirectory>${project.basedir}</outputDirectory>
					<resources>
						<resource>
							<directory>${project.basedir}/templates</directory>
							<filtering>true</filtering>
						</resource>
					</resources>
				</configuration>
				<executions>
					<execution>
						<id>copy-resources</id>
						<phase>process-resources</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- compilation -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>${compiler.plugin.version}</version>
				<configuration>
					<source>1.6</source>
					<target>1.6</target>

					<!-- check for warnings, fail and show if there are any -->
					<showWarnings>true</showWarnings>
					<compilerArgs>
						<arg>-proc:none</arg>
						<arg>-Werror</arg>
						<arg>-Xlint</arg>
					</compilerArgs>
				</configuration>
			</plugin>

			<!-- code coverage -->
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>${jacoco.version}</version>
				<configuration>
					<!-- allows skipping of code coverage -->
					<skip>${skip.code.coverage}</skip>

					<!-- dump on test exit -->
					<dumpOnExit>true</dumpOnExit>
				</configuration>
				<executions>
					<execution>
						<id>prepare-jacoco-ut</id>
						<phase>process-test-resources</phase>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

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

			<!-- licensing -->
			<plugin>
				<groupId>com.mycila.maven-license-plugin</groupId>
				<artifactId>maven-license-plugin</artifactId>
				<version>${license.plugin.version}</version>
				<configuration>
					<header>LICENSE_HEADER.txt</header>
					<strictCheck>true</strictCheck>
					<includes>
						<include>src/</include>
					</includes>
					<excludes>
						<exclude>src/example/java/com/codereligion/example/Example.java</exclude>
					</excludes>
				</configuration>
				<executions>
					<execution>
						<id>check-license</id>
						<phase>test</phase>
						<goals>
							<goal>check</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- sources -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>${source.plugin.version}</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<phase>post-integration-test</phase>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- java doc -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>${javadoc.plugin.version}</version>
				<configuration>
					<excludePackageNames>com.codereligion.reflect.internal</excludePackageNames>
				</configuration>
				<executions>
					<execution>
						<id>attach-docs</id>
						<phase>post-integration-test</phase>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

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

		</plugins>
	</build>

	<dependencies>

		<!-- |||||||||||||||||||| -->
		<!-- compile dependencies -->
		<!-- |||||||||||||||||||| -->

		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
			<version>${guava.version}</version>
		</dependency>

		<dependency>
			<groupId>com.google.code.findbugs</groupId>
			<artifactId>jsr305</artifactId>
			<version>${jsr305.version}</version>
		</dependency>

		<!-- ||||||||||||||||| -->
		<!-- test dependencies -->
		<!-- ||||||||||||||||| -->

		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>${junit.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest-integration</artifactId>
			<version>${hamcrest.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<version>${mockito.version}</version>
			<scope>test</scope>
		</dependency>

	</dependencies>

	<profiles>
		<profile>
			<id>generate.license.headers</id>
			<build>
				<plugins>
					<plugin>
						<groupId>com.mycila.maven-license-plugin</groupId>
						<artifactId>maven-license-plugin</artifactId>
						<executions>
							<execution>
								<id>format-license</id>
								<phase>generate-sources</phase>
								<goals>
									<goal>format</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>
