<?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>
    <groupId>org.jboss.jsfunit</groupId>
    <artifactId>jboss-jsfunit-examples</artifactId>
    <version>1.0.0.GA</version>
  </parent>

  <modelVersion>4.0.0</modelVersion>
  <artifactId>jboss-jsfunit-examples-icefaces</artifactId>
  <packaging>war</packaging>  
  <name>Test IceFaces address app</name>      
 
  <profiles>
     <!--
    <profile>
      <id>jee5</id>        
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            
            <executions>
              <execution>
                <id>surefire-it</id>
                <phase>integration-test</phase>
                <goals>
                  <goal>test</goal>
                </goals>
                <configuration>
                  <skip>false</skip>
                  <systemProperties>
                    <property>
                      <name>cactus.contextURL</name>
                      <value>http://localhost:8080/${artifactId}</value>
                    </property>
                  </systemProperties>
                </configuration>
              </execution>
            </executions>
          </plugin>
          
          <plugin>
            <groupId>org.codehaus.cargo</groupId>
            <artifactId>cargo-maven2-plugin</artifactId>
            <configuration>
              <wait>false</wait>
              <configuration>                  
                <deployables>
                  <deployable>
                    <location>${project.build.directory}/${artifactId}.war</location>
                    <type>war</type>
                  </deployable>
                </deployables>
              </configuration>
            </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>

        </plugins>
      </build>
    </profile> -->
    
    <profile>
      <id>tomcat6x</id>        
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            
            <executions>
              <execution>
                <id>surefire-it</id>
                <phase>integration-test</phase>
                <goals>
                  <goal>test</goal>
                </goals>
                <configuration>
                  <skip>false</skip>
                  <systemProperties>
                    <property>
                      <name>cactus.contextURL</name>
                      <value>http://localhost:8080/${artifactId}</value>
                    </property>
                  </systemProperties>
                </configuration>
              </execution>
            </executions>
          </plugin>
          
          <plugin>
            <groupId>org.codehaus.cargo</groupId>
            <artifactId>cargo-maven2-plugin</artifactId>
            <configuration>
              <wait>false</wait>
              <configuration>                  
                <deployables>
                  <deployable>
                    <location>${project.build.directory}/${artifactId}.war</location>
                    <type>war</type>
                  </deployable>
                </deployables>
              </configuration>
            </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>

        </plugins>
      </build>
    </profile>
  </profiles>
  
  <dependencies>    
    <dependency>
       <groupId>org.jboss.jsfunit</groupId>
       <artifactId>icefaces-demo-address</artifactId>
       <scope>compile</scope>
       <version>1.7.2-SP1</version>
       <type>war</type>
    </dependency>
    
    <dependency>
      <groupId>org.jboss.jsfunit</groupId>
      <artifactId>jboss-jsfunit-core</artifactId>
      <version>${project.version}</version>
      <scope>compile</scope>
    </dependency>
  </dependencies>

  <build>
    <sourceDirectory>src/test/java</sourceDirectory>
    <testSourceDirectory>src/test/java</testSourceDirectory>
    <plugins>
       <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
    </plugins>  
  </build>

</project>
