<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>org.richfaces.test-applications</groupId>
        <artifactId>regressionArea</artifactId>
        <version>3.3.0.BETA3</version>
    </parent>
	<groupId>org.richfaces.test-applications.regressionArea</groupId>
    <artifactId>regressionArea-web</artifactId>
    <name>Regression Area Web Module</name>
    <packaging>war</packaging>
    
    <dependencies>
		<dependency>
            <groupId>org.richfaces.framework</groupId>
            <artifactId>richfaces-api</artifactId>
            <version>${richversion}</version>
			<scope>provided</scope>
        </dependency>
     	<dependency>
            <groupId>org.richfaces.framework</groupId>
            <artifactId>richfaces-impl</artifactId>
            <version>${richversion}</version>
			<exclusions>
				<exclusion>
					<artifactId>commons-logging</artifactId>
					<groupId>commons-logging</groupId>
				</exclusion>
				<exclusion>
					<artifactId>commons-beanutils</artifactId>
					<groupId>commons-beanutils</groupId>
				</exclusion>
			</exclusions>
        </dependency>
        <dependency>
            <groupId>org.richfaces.ui</groupId>
            <artifactId>richfaces-ui</artifactId>
            <version>${richversion}</version>
        </dependency>
    	<dependency>
			<groupId>org.richfaces.test-applications.regressionArea</groupId>
			<artifactId>regressionArea-ejb</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>
       <dependency>
			<groupId>org.testng</groupId>
			<artifactId>testng</artifactId>
			<version>5.8</version>
			<scope>test</scope>
			<type>pom</type>
		</dependency>
		<dependency>
			<groupId>org.testng</groupId>
			<artifactId>testng</artifactId>
			<version>5.8</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-SNAPSHOT</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.openqa.selenium.server</groupId>
			<artifactId>selenium-server-coreless</artifactId>
			<version>1.0-SNAPSHOT</version>
			<scope>test</scope>
			<exclusions>
				<exclusion>
					<groupId>jetty</groupId>
					<artifactId>org.mortbay.jetty</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		 <dependency>
            <groupId>com.sun.facelets</groupId>
            <artifactId>jsf-facelets</artifactId>
            <version>1.1.14</version>
        </dependency>
    </dependencies>
    
    
    <build>
	<finalName>regressionArea-web</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
					<!--skip>true</skip-->
                    <source>1.5</source>
                    <target>1.5</target>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <webResources>
                        <resource>
							<filtering>true</filtering>
                            <directory>${project.build.directory}</directory>
							<excludes>
								<exclude>test-classes/**</exclude>
							</excludes>
                        </resource>
                    </webResources>
                </configuration>
            </plugin>
			<plugin>
			<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>2.4.3</version>
					<configuration>
						<skip>true</skip>
					</configuration>
			</plugin>
        </plugins>
		
    </build>
 
    <profiles>
	   	<profile>
			<id>Test</id>
			<activation>
				<activeByDefault>false</activeByDefault>
			</activation>
			
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-antrun-plugin</artifactId>
						<executions>
							<execution>
							<id>copyDataSource</id>
							<phase>pre-integration-test</phase>
							<goals>
								<goal>run</goal>
							</goals>
							<configuration>
								<tasks>
									<copy file="../regressionArea-ear/resources/seam-ds.xml" toDir="${jbosshome}/server/${jbosscontext}/deploy"/>
								</tasks>
							</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
				<groupId>org.codehaus.cargo</groupId>
				<artifactId>cargo-maven2-plugin</artifactId>
				<version>0.3.1</version>
				<executions>
					<execution>
						<id>start-container</id>
						<phase>pre-integration-test</phase>
						<goals>
							<goal>deploy</goal>
							<goal>start</goal>
						</goals>
					</execution>
					<execution>
						<id>stop-container</id>
						<phase>post-integration-test</phase>
						<goals>
							<goal>stop</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<wait>false</wait>
					<container>
						<containerId>jboss4x</containerId>
						<home>${jbosshome}</home>
						<append>false</append>
					</container>
					<configuration>
   						  <home>${jbosshome}/server/${jbosscontext}</home>
						  <type>existing</type>
						  <properties>
        			        <cargo.hostname>localhost</cargo.hostname>
        			        <cargo.jboss.configuration>${jbosscontext}</cargo.jboss.configuration>
        			        <cargo.rmi.port>1099</cargo.rmi.port>
        			      </properties>
					</configuration>
					<deployer>
    					<type>installed</type>
    					<deployables>
    					<deployable>
		<location>${settings.localRepository}/org/richfaces/test-applications/regressionArea/regressionArea-ear/${version}/regressionArea-ear-${version}.ear</location>
        					<type>ear</type>
				       </deployable>
       				   </deployables>
    				</deployer>
				</configuration>
			</plugin>
			<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>2.4.3</version>
					<configuration>
					<!-- Skip the normal tests, we'll run them in the integration-test phase -->
					<suiteXmlFiles>
						<suiteXmlFile>
							src/test/resources/testng.xml
						</suiteXmlFile>
					</suiteXmlFiles>
					<!--properties>
				    	<property>
			          	<name>listener</name>
			          	<value>org.richfaces.TestAnnotationTransformer</value>
				    	</property>
				    </properties-->
					</configuration>
					<executions>
						<execution>
							<phase>integration-test</phase>
							<goals>
								<goal>test</goal>
							</goals>
							<configuration>
								<skip>false</skip>
							</configuration>
						</execution>
					</executions>
			</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
