<?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">

	<!--
    Copyright 2009 Solnet Solutions Limited
    (http://www.solnetsolutions.co.nz/) Licensed under the Apache License,
    Version 2.0 (the "License"); you may not use this file except in
    compliance with the License. You may obtain a copy of the License at
    
    http://www.apache.org/licenses/LICENSE-2.0 Unless required by
    applicable law or agreed to in writing, software distributed under the
    License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
    CONDITIONS OF ANY KIND, either express or implied. See the License for
    the specific language governing permissions and limitations under the
    License.
    
    @author John Bebbington
	-->

	<modelVersion>4.0.0</modelVersion>

	<parent>
		<artifactId>tohu-clients</artifactId>
		<groupId>org.tohu</groupId>
		<version>1.5.0</version>
	</parent>

	<artifactId>tohu-jquery-client</artifactId>

	<packaging>jar</packaging>
	<name>Tohu :: Clients :: JQuery Web Client</name>

	<repositories>
		<repository>
			<id>openqa-releases</id>
			<name>OpenQA Releases</name>
			<url>http://nexus.openqa.org/content/repositories/releases</url>
			<layout>default</layout>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
			<releases>
				<enabled>true</enabled>
			</releases>
		</repository>
	</repositories>

	<build>
		<finalName>tohu-jquery-client</finalName>
		<outputDirectory>${basedir}/${target.dir}</outputDirectory>
		<testOutputDirectory>${basedir}/${test.target.dir}</testOutputDirectory>
		<resources>
			<resource>
				<directory>src/main/webapp</directory>
			</resource>
		</resources>
		<testResources>
			<testResource>
				<directory>src/main/webapp</directory>
			</testResource>
			<testResource>
				<directory>src/test/webapp</directory>
			</testResource>
			<testResource>
				<directory>src/test/resources</directory>
				<filtering>true</filtering>
			</testResource>
		</testResources>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>selenium-maven-plugin</artifactId>
				<version>2.3</version>
				<executions>
					<execution>
						<phase>pre-integration-test</phase>
						<goals>
							<goal>start-server</goal>
						</goals>
						<configuration>
							<background>true</background>
							<!-- Uncomment for debugging.
							<browserSideLog>true</browserSideLog>
							<debug>true</debug>
							<logOutput>true</logOutput>
							-->
						</configuration>
					</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>
				</configuration>
				<version>2.4.3</version>
				<executions>
					<execution>
						<phase>integration-test</phase>
						<goals>
							<goal>test</goal>
						</goals>
						<configuration>
							<skip>false</skip>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<properties>
		<target.dir>target/classes</target.dir>
		<test.target.dir>target/test-classes</test.target.dir>
		<site-deploy>${basedir}/../</site-deploy>
		<tohu.client.log.level>INFO</tohu.client.log.level>
	</properties>

	<profiles>
		<profile>
			<id>eclipse-folders</id>
			<properties>
				<target.dir>target-eclipse/test-classes</target.dir>
				<test.target.dir>target-eclipse/test-classes</test.target.dir>
			</properties>
		</profile>
	</profiles>

	<dependencies>

		<dependency>
			<groupId>org.seleniumhq.selenium</groupId>
			<artifactId>selenium-java</artifactId>
			<version>2.24.1</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.seleniumhq.selenium</groupId>
			<artifactId>selenium-server</artifactId>
			<version>2.24.1</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>jetty</groupId>
			<artifactId>jetty</artifactId>
			<version>5.1.10</version>
			<scope>test</scope>
		</dependency>
		<!--
		TODO Replace the above dependency with this one if Selenium ever
		allows a Jetty version more recent then 5.1, see http://jira.openqa.org/browse/SRC-176
		<dependency>
			<groupId>org.mortbay.jetty</groupId>
			<artifactId>jetty</artifactId>
			<version>6.1.16</version>
			<scope>test</scope>
		</dependency>
		-->

		<dependency>
			<groupId>commons-httpclient</groupId>
			<artifactId>commons-httpclient</artifactId>
			<version>3.1</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>commons-lang</groupId>
			<artifactId>commons-lang</artifactId>
			<version>2.3</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>		
		</dependency>
			
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.5</version>
			<scope>test</scope>
		</dependency>
					
	</dependencies>
</project>
