<?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">
	<parent>
		<artifactId>samples</artifactId>
		<groupId>org.richfaces</groupId>
		<version>3.2.0.CR7</version>
	</parent>
	<modelVersion>4.0.0</modelVersion>
	<groupId>seleniumTest</groupId>
	<artifactId>seleniumTest</artifactId>
	<packaging>war</packaging>
	<name>seleniumTest Maven Webapp</name>
	<version>3.2.0.CR7</version>
	<url>http://maven.apache.org</url>
	<repositories>
		<repository>
			<id>openqa</id>
			<name>OpenQA Repository</name>
			<url>http://archiva.openqa.org/repository/releases</url>
			<layout>default</layout>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
			<releases>
				<enabled>true</enabled>
			</releases>
		</repository>
	</repositories>
	<build>
		<finalName>seleniumTest</finalName>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>selenium-maven-plugin</artifactId>
				<executions>
					<execution>
						<phase>pre-integration-test</phase>
						<goals>
							<goal>start-server</goal>
						</goals>
						<configuration>
							<background>true</background>
							<debug>false</debug>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.codehaus.cargo</groupId>
				<artifactId>cargo-maven2-plugin</artifactId>
				<version>0.3.1</version>
				<dependencies></dependencies>
				<configuration>
					<wait>false</wait>
					<container>
						<containerId>jetty6x</containerId>
						<dependencies>
							<dependency>
								<groupId>javax.el</groupId>
								<artifactId>el-api</artifactId>
							</dependency>
							<dependency>
								<groupId>el-impl</groupId>
								<artifactId>el-impl</artifactId>
							</dependency>
						</dependencies>
						<type>embedded</type>
					</container>
				</configuration>
				<executions>
					<execution>
						<id>start-container</id>
						<phase>pre-integration-test</phase>
						<goals>
							<goal>start</goal>
						</goals>
					</execution>

					<execution>
						<id>stop-container</id>
						<phase>post-integration-test</phase>
						<goals>
							<goal>stop</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>

				<configuration>
					<!-- Skip the normal tests, we'll run them in the integration-test phase -->
					<skip>true</skip>
					<suiteXmlFiles>
						<suiteXmlFile>
							${project.build.directory}/test-classes/testng/testng.xml
						</suiteXmlFile>
					</suiteXmlFiles>
				</configuration>

				<executions>
					<execution>
						<phase>integration-test</phase>
						<goals>
							<goal>test</goal>
						</goals>
						<configuration>
							<skip>false</skip>
							<suiteXmlFiles>
								<suiteXmlFile>
									${project.build.directory}/test-classes/testng/testng.xml
								</suiteXmlFile>
							</suiteXmlFiles>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
	<profiles>
		<profile>
			<id>linux</id>
			<activation>
				<os>
					<family>unix</family>
				</os>
			</activation>
			<build>
				<testResources>
					<testResource>
						<directory>src/test/testng/unix</directory>
						<targetPath>testng</targetPath>
						<filtering>true</filtering>
					</testResource>
				</testResources>
			</build>
		</profile>
		<profile>
			<id>windows</id>
			<activation>
				<os>
					<family>windows</family>
				</os>
			</activation>
			<build>
				<testResources>
					<testResource>
						<directory>src/test/testng/win</directory>
						<targetPath>testng</targetPath>
						<filtering>true</filtering>
					</testResource>
				</testResources>
			</build>
		</profile>
	</profiles>
	<dependencies>
		<dependency>
			<groupId>org.testng</groupId>
			<artifactId>testng</artifactId>
			<version>5.7</version>
			<scope>test</scope>
			<classifier>jdk15</classifier>
		</dependency>
		<dependency>
			<groupId>org.openqa.selenium.client-drivers</groupId>
			<artifactId>selenium-java-client-driver</artifactId>
			<version>1.0-beta-1</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.openqa.selenium.server</groupId>
			<artifactId>selenium-server-coreless</artifactId>
			<version>1.0-beta-1</version>
			<scope>test</scope>
			<exclusions>
				<exclusion>
					<groupId>jetty</groupId>
					<artifactId>org.mortbay.jetty</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
	</dependencies>
</project>