<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>guru.breakthemonolith</groupId>
	<artifactId>btm-DropwizardHealthChecks</artifactId>
	<version>0.1.0</version>
	<packaging>pom</packaging>
	<name>btm-DropwizardHealthChecks</name>
	<description>btm-DropwizardHealthChecks</description>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<skip.integration.tests>true</skip.integration.tests>
		<skip.unit.tests>false</skip.unit.tests>
	</properties>

	<developers>
		<developer>
			<name>Derek C. Ashmore</name>
		</developer>
	</developers>

	<dependencies>

		<!-- Production dependencies -->
		<dependency>
			<groupId>io.dropwizard.metrics</groupId>
			<artifactId>metrics-healthchecks</artifactId>
			<version>3.1.2</version>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
			<version>3.5</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>1.7.21</version>
		</dependency>

		<!-- Test dependencies -->
		<dependency>
			<groupId>org.force66</groupId>
			<artifactId>BeanTester</artifactId>
			<version>1.0.0</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.12</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-all</artifactId>
			<version>1.10.19</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-simple</artifactId>
			<version>1.7.21</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>guru.breakthemonolith</groupId>
			<artifactId>DockerProcessAPI</artifactId>
			<version>0.1.0-rc3</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.2</version>
				<configuration>
					<source>1.7</source>
					<target>1.7</target>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.pitest</groupId>
				<artifactId>pitest-maven</artifactId>
				<version>1.1.3</version>
				<configuration>
					<targetClasses>
						<param>guru.breakthemonolith*</param>
					</targetClasses>
					<targetTests>
						<param>guru.breakthemonolith*Test</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>
				<version>3.0.1</version>
				<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>
				<version>2.10.4</version>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.19.1</version>
				<configuration>
					<!-- Skips unit tests if the value of skip.unit.tests property is true -->
					<skipTests>#{skip.unit.tests}</skipTests>
					<!-- Excludes integration tests when unit tests are run. -->
					<excludes>
						<exclude>**/*IntegrationTest.java</exclude>
					</excludes>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-failsafe-plugin</artifactId>
				<version>2.15</version>
				<executions>
					<!-- Ensures that both integration-test and verify goals of the Failsafe 
						Maven plugin are executed. -->
					<execution>
						<id>integration-tests</id>
						<goals>
							<goal>integration-test</goal>
							<goal>verify</goal>
						</goals>
						<configuration>
							<!-- Skips integration tests if the value of skip.integration.tests 
								property is true -->
							<skipTests>#{skip.integration.tests}</skipTests>
							<includes>
								<include>**/*TestIntegration.java</include>
							</includes>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>

	</build>

	<profiles>
		<profile>
			<id>Deploy</id>
			<properties>
				<!-- All tests are run. -->
				<skip.integration.tests>false</skip.integration.tests>
				<skip.unit.tests>false</skip.unit.tests>
			</properties>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-antrun-plugin</artifactId>
						<version>1.8</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/btm-DropwizardHealthChecks-0.1.0.pom" />
										<replace
											file="target/mavenrepo/btm-DropwizardHealthChecks-0.1.0.pom">
											<replacefilter>
												<replacetoken>#</replacetoken>
												<replacevalue>#</replacevalue>
											</replacefilter>
											<replacefilter>
												<replacetoken>0.1.0</replacetoken>
												<replacevalue>0.1.0</replacevalue>
											</replacefilter>
											<replacefilter>
												<replacetoken>https://github.com/BreakTheMonolith/btm-DropwizardHealthChecks</replacetoken>
												<replacevalue>https://github.com/BreakTheMonolith/btm-DropwizardHealthChecks</replacevalue>
											</replacefilter>
											<replacefilter>
												<replacetoken>btm-DropwizardHealthChecks</replacetoken>
												<replacevalue>btm-DropwizardHealthChecks</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\btm-DropwizardHealthChecks-0.1.0.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\btm-DropwizardHealthChecks-0.1.0.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\btm-DropwizardHealthChecks-0.1.0-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\btm-DropwizardHealthChecks-0.1.0-sources.jar" />
										</exec>
										<jar destfile="target/btm-DropwizardHealthChecks-0.1.0-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>
		</profile>

	</profiles>

	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
		</license>
	</licenses>
	<url>https://github.com/BreakTheMonolith/btm-DropwizardHealthChecks</url>
	<scm>
		<url>https://github.com/BreakTheMonolith/btm-DropwizardHealthChecks.git</url>
		<connection>scm:git:https://github.com/BreakTheMonolith/btm-DropwizardHealthChecks.git</connection>
		<developerConnection>Derek C. Ashmore</developerConnection>
	</scm>

	<modules>
		<module>btm-DropwizardHealthChecks-jdbc</module>
		<module>btm-DropwizardHealthChecks-net</module>
		<module>btm-DropwizardHealthChecks-rabbitmq</module>
		<module>btm-DropwizardHealthChecks-cassandra</module>
		<module>btm-DropwizardHealthChecks-mongodb</module>
	</modules>
</project>