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

	<parent>
		<groupId>io.earcam.maven</groupId>
		<artifactId>io.earcam.maven.pom</artifactId>
		<version>2.0.5</version>
	</parent>

	<groupId>io.earcam</groupId>
	<artifactId>io.earcam.unexceptional</artifactId>
	<version>0.2.0</version>
	
	<packaging>jar</packaging>


	<properties>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>

		<sonar.pitest.mode>active</sonar.pitest.mode>
		
		<coordinate.username.project>earcam/io.earcam.unexceptional</coordinate.username.project>
	</properties>


	<!-- <url>http://github.com/${coordinate.username.project}</url> -->
	<url>http://unexceptional.earcam.io</url>
	<inceptionYear>2016</inceptionYear>

	<scm>
		<connection>scm:git:git://github.com/${coordinate.username.project}.git</connection>
		<developerConnection>scm:git:ssh://github.com:${coordinate.username.project}.git</developerConnection>
		<url>http://github.com/${coordinate.username.project}/tree/master</url>
	  <tag>v0.2.0</tag>
  </scm>

	<ciManagement>
		<system>Jenkins</system>
		<url>https://travis-ci.org/${coordinate.username.project}</url>
	</ciManagement>

	<issueManagement>
		<system>GitHub</system>
		<url>http://github.com/${coordinate.username.project}/issues</url>
	</issueManagement>

	<distributionManagement>
		<site>
			<id>gh-pages</id>
			<name>Deployment through GitHub's site deployment plugin</name>
			<url>${url.site.deploy}</url>
		</site>
	</distributionManagement>


	<dependencies>
		<dependency>
			<groupId>com.google.code.findbugs</groupId>
			<artifactId>jsr305</artifactId>
			<version>3.0.2</version>
			<scope>provided</scope>
			<optional>true</optional>
		</dependency>

		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.12</version>
			<scope>test</scope>
			<exclusions>
				<exclusion>
					<groupId>org.hamcrest</groupId>
					<artifactId>hamcrest-core</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>java-hamcrest</artifactId>
			<version>2.0.0.0</version>
			<scope>test</scope>
		</dependency>
	</dependencies>


	<build>
		<plugins>
			<plugin>
				<groupId>de.thetaphi</groupId>
				<artifactId>forbiddenapis</artifactId>
				<version>2.3</version>
				<executions>
					<execution>
						<id>check</id>
						<goals>
							<goal>check</goal>
						</goals>
						<configuration>
							<bundledSignatures>
								<bundledSignature>jdk-unsafe</bundledSignature>
								<bundledSignature>jdk-internal</bundledSignature>
								<bundledSignature>jdk-deprecated</bundledSignature>
								<bundledSignature>jdk-non-portable</bundledSignature>
								<bundledSignature>jdk-system-out</bundledSignature>
								<bundledSignature>jdk-reflection</bundledSignature>
							</bundledSignatures>
						</configuration>
					</execution>
					<execution>
						<id>testCheck</id>
						<goals>
							<goal>testCheck</goal>
						</goals>
						<configuration>
							<bundledSignatures>
								<bundledSignature>jdk-unsafe</bundledSignature>
								<bundledSignature>jdk-internal</bundledSignature>
								<bundledSignature>jdk-deprecated</bundledSignature>
								<bundledSignature>jdk-non-portable</bundledSignature>
								<bundledSignature>jdk-system-out</bundledSignature>
								<!-- <bundledSignature>jdk-reflection</bundledSignature> -->
							</bundledSignatures>
						</configuration>
					</execution>
				</executions>
			</plugin>

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

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.6.1</version>
				<configuration>
					<source>${maven.compiler.source}</source>
					<target>${maven.compiler.target}</target>
					<encoding>${project.build.sourceEncoding}</encoding>
					<showDeprecation>true</showDeprecation>
					<showWarnings>true</showWarnings>
					<compilerArgument>-Xlint:all</compilerArgument>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<version>3.3.0</version>
				<extensions>true</extensions>
				<configuration>
					<archive>
						<addMavenDescriptor>true</addMavenDescriptor>
					</archive>
					<supportedProjectTypes>
						<supportedProjectType>jar</supportedProjectType>
					</supportedProjectTypes>
					<instructions>
						<Bundle-Vendor>${project.developers[0].name} - ${project.organization.name}</Bundle-Vendor>
						<Bundle-ContactAddress>${project.organization.url}</Bundle-ContactAddress>
						<Bundle-Description>${project.description}</Bundle-Description>
						<Bundle-DocURL>${project.url}</Bundle-DocURL>
						<Bundle-Category>${project.groupId}</Bundle-Category>
						<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
						<Bundle-Version>${project.version}</Bundle-Version>
					</instructions>
				</configuration>
				<executions>
					<execution>
						<id>create-manifest</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>manifest</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>3.0.2</version>
				<configuration>
					<archive>
						<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
					</archive>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.20</version>
				<dependencies>
					<dependency>
						<groupId>org.apache.maven.surefire</groupId>
						<artifactId>surefire-junit4</artifactId>
						<version>2.20</version>
					</dependency>
				</dependencies>
				<executions>
					<execution>
						<goals>
							<goal>test</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<parallel>false</parallel>
					<testFailureIgnore>false</testFailureIgnore>
					<includes>
						<include>**/*Test.java</include>
						<include>**/*Example.java</include>
					</includes>
					<systemProperties>
						<org.openjdk.java.util.stream.tripwire>true</org.openjdk.java.util.stream.tripwire>
					</systemProperties>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>
