<?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/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>net.officefloor.tutorial</groupId>
		<artifactId>tutorials</artifactId>
		<version>2.12.0</version>
	</parent>
	<artifactId>TestHttpServer</artifactId>
	<packaging>war</packaging>
	<name>Test HTTP Server Tutorial</name>
	<description>Tutorial of unit/system/integration testing a HTTP Server</description>
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<basedir>${basedir}</basedir>
		<projectVersion>${project.version}</projectVersion>
	</properties>
	<dependencies>
		<dependency>
			<groupId>net.officefloor.plugin</groupId>
			<artifactId>officeplugin_woof</artifactId>
		</dependency>
		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.httpcomponents</groupId>
			<artifactId>httpclient</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>
	<build>
		<plugins>
			<plugin>
				<!-- Include the Integration tests source code -->
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>add-source</id>
						<phase>generate-sources</phase>
						<goals>
							<goal>add-test-source</goal>
						</goals>
						<configuration>
							<sources>
								<source>src/test/int</source>
							</sources>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<!-- START SNIPPET: tutorial -->
			<plugin>
				<!-- Start/Stop application for Integration tests -->
				<groupId>net.officefloor.maven</groupId>
				<artifactId>maven-woof-plugin</artifactId>
				<executions>
					<execution>
						<id>run-WoOF</id>
						<phase>pre-integration-test</phase>
						<goals>
							<goal>run</goal>
						</goals>
					</execution>
					<execution>
						<id>stop-WoOF</id>
						<phase>post-integration-test</phase>
						<goals>
							<goal>stop</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<!-- Run Integration tests -->
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-failsafe-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>integration-test</goal>
							<goal>verify</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<!-- END SNIPPET: tutorial -->
		</plugins>
	</build>
	<profiles>
		<profile>
			<!-- Profile for building -->
			<id>build-repositories</id>
			<activation>
				<file>
					<exists>${basedir}/pom.xml</exists>
				</file>
			</activation>
			<repositories>
				<repository>
					<!-- OfficeFloor repository to obtain artifacts for running the example -->
					<id>maven2-repository.officefloor.net</id>
					<name>OfficeFloor Repository for Maven</name>
					<url>http://www.officefloor.net/maven2/</url>
				</repository>
			</repositories>
		</profile>
	</profiles>
</project>