<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>com.smeup</groupId>
	<artifactId>WebUP</artifactId>
	<version>1.4.0</version>
	<packaging>war</packaging>
	<distributionManagement>
		<repository>
			<id>releases</id>
			<name>Internal Releases</name>
			<url>http://mauer.smeup.com/nexus/content/repositories/releases</url>
		</repository>
		<snapshotRepository>
			<id>snapshots</id>
			<name>Internal Snapshots</name>
			<url>http://mauer.smeup.com/nexus/content/repositories/snapshots</url>
		</snapshotRepository>
	</distributionManagement>
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
	</properties>

	<profiles>
		<profile>
			<id>WebUPRC</id>

			<dependencyManagement>
				<dependencies>
					<dependency>
						<groupId>org.jboss.arquillian</groupId>
						<artifactId>arquillian-bom</artifactId>
						<version>1.1.9.Final</version>
						<scope>import</scope>
						<type>pom</type>
					</dependency>
					<dependency>
						<groupId>org.jboss.arquillian.extension</groupId>
						<artifactId>arquillian-drone-bom</artifactId>
						<version>2.0.0.Alpha4</version>
						<type>pom</type>
						<scope>import</scope>
					</dependency>
					<dependency>
						<groupId>org.jboss.arquillian.selenium</groupId>
						<artifactId>selenium-bom</artifactId>
						<version>2.46.0</version>
						<type>pom</type>
						<scope>import</scope>
					</dependency>
				</dependencies>
			</dependencyManagement>

			<properties>
				<it.contextRoot>WebUPIT</it.contextRoot>
				<it.hostname>mauer.smeup.com</it.hostname>
				<it.remote.admin.port>4848</it.remote.admin.port>
				<it.remote.port>8080</it.remote.port>
				<it.remote.https>true</it.remote.https>
				<it.browser>phantomjs</it.browser>
			</properties>

			<build>
				<plugins>
					<plugin>
						<artifactId>maven-failsafe-plugin</artifactId>
						<version>2.18.1</version>
						<executions>
							<execution>
								<goals>
									<goal>integration-test</goal>
									<goal>verify</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>build-helper-maven-plugin</artifactId>
						<version>1.9.1</version>
						<executions>
							<execution>
								<id>add-integration-test-source-as-test-sources</id>
								<phase>generate-test-sources</phase>
								<goals>
									<goal>add-test-source</goal>
								</goals>
								<configuration>
									<sources>
										<source>src/it/java</source>
									</sources>
								</configuration>
							</execution>
							<execution>
								<id>add-integration-test-resources</id>
								<phase>generate-test-resources</phase>
								<goals>
									<goal>add-test-resource</goal>
								</goals>
								<configuration>
									<!-- Configures the resource directory of our integration tests -->
									<resources>
										<!-- Placeholders that are found from the files located in the 
											configured resource directories are replaced with the property values found 
											from the profile specific configuration file. -->
										<resource>
											<filtering>true</filtering>
											<directory>src/it/resources</directory>
										</resource>
									</resources>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
				<finalName>${it.contextRoot}</finalName>
			</build>
			<dependencies>
				<dependency>
					<groupId>org.jboss.arquillian.junit</groupId>
					<artifactId>arquillian-junit-container</artifactId>
					<scope>test</scope>
				</dependency>
				<dependency>
					<groupId>org.jboss.arquillian.container</groupId>
					<artifactId>arquillian-glassfish-remote-3.1</artifactId>
					<version>1.0.0.CR4</version>
					<scope>test</scope>
				</dependency>
				<dependency>
					<groupId>org.jboss.arquillian.graphene</groupId>
					<artifactId>graphene-webdriver</artifactId>
					<version>2.0.3.Final</version>
					<type>pom</type>
					<scope>test</scope>
				</dependency>
			</dependencies>

		</profile>
	</profiles>

	<build>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.3</version>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.18.1</version>
			</plugin>
			<plugin>
				<groupId>org.codehaus.cargo</groupId>
				<artifactId>cargo-maven2-plugin</artifactId>
				<version>1.4.15</version>
				<configuration>
					<container>
						<containerId>glassfish4x</containerId>
						<type>remote</type>
					</container>
					<!-- deployer configuration -->
					<configuration>
						<type>runtime</type>
						<properties>
							<cargo.hostname>${cargo.hostname}</cargo.hostname>
							<cargo.remote.username>${cargo.remote.username}</cargo.remote.username>
							<cargo.remote.password>${cargo.remote.password}</cargo.remote.password>
							<cargo.remote.port>${cargo.remote.port}</cargo.remote.port>
						</properties>
					</configuration>
					<deployables>
						<deployable>
							<groupId>${project.groupId}</groupId>
							<artifactId>${project.artifactId}</artifactId>
							<type>war</type>
							<properties>
								<context>${context}</context>
							</properties>
						</deployable>
					</deployables>
				</configuration>
				<dependencies>
					<dependency>
						<groupId>org.glassfish.main.deployment</groupId>
						<artifactId>deployment-client</artifactId>
						<version>4.0</version>
					</dependency>
				</dependencies>
			</plugin>
		</plugins>

	</build>

	<reporting>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-pmd-plugin</artifactId>
				<version>3.5</version>
				<configuration>
					<targetJdk>1.8</targetJdk>
				</configuration>
			</plugin>
		</plugins>
	</reporting>

	<dependencies>
		<dependency>
			<groupId>com.smeup</groupId>
			<artifactId>WebApp</artifactId>
			<version>1.4.0</version>
		</dependency>
		<dependency>
			<groupId>javax</groupId>
			<artifactId>javaee-api</artifactId>
			<version>7.0</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>com.smeup</groupId>
			<artifactId>LoocupImg</artifactId>
			<version>1.4.0</version>
		</dependency>
		<dependency>
			<groupId>com.smeup</groupId>
			<artifactId>SVGToPng</artifactId>
			<version>1.0.0</version>
		</dependency>
		<dependency>
			<groupId>com.smeup.themes</groupId>
			<artifactId>webup</artifactId>
			<version>1.0.1</version>
		</dependency>
		<dependency>
			<groupId>org.primefaces.themes</groupId>
			<artifactId>bootstrap</artifactId>
			<version>1.0.10</version>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.12</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest-all</artifactId>
			<version>1.3</version>
			<scope>test</scope>
		</dependency>

	</dependencies>
</project>