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

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

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

	<description>A small cohesive module, leveraging Java 8 functional capabilities to remove most of the boiler-plate of handling checked exceptions.</description>
	<url>https://unexceptional.earcam.io</url>
	<inceptionYear>2016</inceptionYear>

	<scm>
		<connection>scm:git:ssh://git@bitbucket.org/${coordinate.username.project}.git</connection>
		<developerConnection>scm:git:ssh://git@bitbucket.org/${coordinate.username.project}.git</developerConnection>
		<url>http://bitbucket.org/${coordinate.username.project}.git</url>
		<tag>v0.3.0</tag>
	</scm>
	<issueManagement>
		<system>BitBucket</system>
		<url>https://bitbucket.org/${coordinate.username.project}/issues</url>
	</issueManagement>
	<ciManagement>
		<system>Travis</system>
		<url>https://travis-ci.org/${coordinate.username.project}</url>
	</ciManagement>
	<distributionManagement>
		<site>
			<id>netlify</id>
			<url>https://unexceptional.earcam.io</url>
		</site>
	</distributionManagement>

	<properties>
		<version.java.platform>8</version.java.platform>
		<version.java>1.${version.java.platform}</version.java>
		<maven.compiler.source>${version.java}</maven.compiler.source>
		<maven.compiler.target>${version.java}</maven.compiler.target>

		<coordinate.username.project>earcam/${project.artifactId}</coordinate.username.project>

		<skip.execution.pitest>false</skip.execution.pitest>
	</properties>

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

		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<version>2.11.0</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<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.7.0</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>
				<configuration>
					<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>
