<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>org.force66</groupId>
		<artifactId>RequestCorrelation</artifactId>
		<version>1.0.0-rc1</version>
	</parent>
	<artifactId>RequestCorrelation-core</artifactId>
	<dependencies>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
			<version>3.3.2</version>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-collections4</artifactId>
			<version>4.0</version>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.11</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>1.6.6</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-simple</artifactId>
			<version>1.6.6</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>javax.servlet-api</artifactId>
			<version>3.1.0</version>
			<scope>provided</scope>
		</dependency>
	</dependencies>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>cobertura-maven-plugin</artifactId>
					<version>2.6</version>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.2</version>
				<configuration>
					<source>1.6</source>
					<target>1.6</target>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>cobertura-maven-plugin</artifactId>
				<version>2.6</version>

				<configuration>
					<formats>
						<format>html</format>
						<format>xml</format>
					</formats>
					<instrumentation>

						<includes>
							<include>org/force66/**/*.class</include>
						</includes>
						<excludes>
							<exclude>org/force66/**/*Test.class</exclude>
						</excludes>
					</instrumentation>

				</configuration>

				<executions>
					<execution>
						<id>clean</id>
						<phase>clean</phase>
						<goals>
							<goal>clean</goal>
						</goals>
					</execution>
					<execution>
						<id>report-coverage</id>
						<phase>package</phase>
						<goals>
							<goal>cobertura</goal>
						</goals>
						<configuration>
							<outputDirectory>#{project.reporting.outputDirectory}/cobertura-reports</outputDirectory>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.pitest</groupId>
				<artifactId>pitest-maven</artifactId>
				<version>1.1.3</version>
				<configuration>
					<targetClasses>
						<param>org.force66*</param>
					</targetClasses>
					<targetTests>
						<param>org.force66*</param>
					</targetTests>
				</configuration>
				<executions>
					<execution>
						<id>report-coverage</id>
						<phase>package</phase>
						<goals>
							<goal>mutationCoverage</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-antrun-plugin</artifactId>
				<version>1.7</version>
				<executions>
					<execution>
						<phase>install</phase>
						<configuration>
							<tasks>
								<property environment="env" />
								<fail if="#{env.GPG_HOME}" message="GPG_HOME environment variable not defined." />
								<mkdir dir="target/mavenrepo" />

								<copy file="pom.xml"
									tofile="target/mavenrepo/${project.name}-1.0.0-rc1.pom" />
								<replace
									file="target/mavenrepo/${project.name}-1.0.0-rc1.pom">
									<replacefilter>
										<replacetoken>#</replacetoken>
										<replacevalue>#</replacevalue>
									</replacefilter>
									<replacefilter>
										<replacetoken>1.0.0-rc1</replacetoken>
										<replacevalue>1.0.0-rc1</replacevalue>
									</replacefilter>
									<replacefilter>
										<replacetoken>https://github.com/Derek-Ashmore/RequestCorrelation.git</replacetoken>
										<replacevalue>https://github.com/Derek-Ashmore/RequestCorrelation.git</replacevalue>
									</replacefilter>
									<replacefilter>
										<replacetoken>${project.name}</replacetoken>
										<replacevalue>${project.name}</replacevalue>
									</replacefilter>
									
								</replace>


								<copy todir="target/mavenrepo">
									<fileset dir="target" includes="*.jar" />
								</copy>

								<exec executable="cmd" dir="target/mavenrepo">
									<env key="PATH" path="#{env.GPG_HOME}" />
									<arg line="/c" />
									<arg line="gpg2.exe" />
									<arg line="-ab" />
									<arg
										line="#{project.build.directory}\mavenrepo\${project.name}-1.0.0-rc1.pom" />
								</exec>
								<exec executable="cmd" dir="target/mavenrepo">
									<env key="PATH" path="#{env.GPG_HOME}" />
									<arg line="/c" />
									<arg line="gpg2.exe" />
									<arg line="-ab" />
									<arg
										line="#{project.build.directory}\mavenrepo\${project.name}-1.0.0-rc1.jar" />
								</exec>
								<exec executable="cmd" dir="target/mavenrepo">
									<env key="PATH" path="#{env.GPG_HOME}" />
									<arg line="/c" />
									<arg line="gpg2.exe" />
									<arg line="-ab" />
									<arg
										line="#{project.build.directory}\mavenrepo\${project.name}-1.0.0-rc1-javadoc.jar" />
								</exec>
								<exec executable="cmd" dir="target/mavenrepo">
									<env key="PATH" path="#{env.GPG_HOME}" />
									<arg line="/c" />
									<arg line="gpg2.exe" />
									<arg line="-ab" />
									<arg
										line="#{project.build.directory}\mavenrepo\${project.name}-1.0.0-rc1-sources.jar" />
								</exec>
								<jar destfile="target/${project.name}-1.0.0-rc1-bundle.jar">
									<fileset dir="target/mavenrepo" includes="*.jar" />
									<fileset dir="target/mavenrepo" includes="*.pom" />
									<fileset dir="target/mavenrepo" includes="*.asc" />
								</jar>
							</tasks>
						</configuration>
						<goals>
							<goal>run</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<reporting>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>cobertura-maven-plugin</artifactId>
				<version>2.6</version>
				<reportSets>
					<reportSet />
				</reportSets>
				<configuration>
					<formats>
						<format>html</format>
						<format>xml</format>
					</formats>
				</configuration>
			</plugin>
		</plugins>
	</reporting>
	<description>This project is a Java library that facilitates establishing and tracking correlation ids for micro-services.</description>
	<url>https://github.com/Derek-Ashmore/RequestCorrelation.git</url>
	<scm>
		<url>https://github.com/Derek-Ashmore/RequestCorrelation.git/RequestCorrelation-core</url>
		<connection>scm:git:https://github.com/Derek-Ashmore/RequestCorrelation.git/RequestCorrelation-core</connection>
	</scm>
</project>