<?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</artifactId>
    <version>1.0-beta-1</version>
  </parent>

  <modelVersion>4.0.0</modelVersion>
  <packaging>pom</packaging>
  <artifactId>jboss-jsfunit-examples</artifactId>
  <name>JSFUnit Examples</name>    

  <modules>
    <module>jboss-jsfunit-examples-hellojsf</module>
    <module>jboss-jsfunit-examples-ajax4jsf</module>
    <module>jboss-jsfunit-examples-richfaces</module>
  </modules>
    
  <profiles>
    <profile>
      <id>tomcat5x</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.cargo</groupId>
            <artifactId>cargo-maven2-plugin</artifactId>
            <configuration>
              <container>
                <containerId>tomcat5x</containerId>
                <home>${CATALINA_HOME}</home>
                <log>${basedir}/target/tomcat5x/cargo.log</log>
                <output>${basedir}/target/tomcat5x/container.log</output>
              </container>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>jboss4.0</id>    
      <dependencies>        
        <dependency>
          <groupId>org.apache.myfaces.core</groupId>
          <artifactId>myfaces-impl</artifactId>
          <scope>provided</scope>
        </dependency>
        <dependency>
          <groupId>org.apache.myfaces.core</groupId>
          <artifactId>myfaces-api</artifactId>
          <scope>provided</scope>
        </dependency>
      </dependencies>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.cargo</groupId>
            <artifactId>cargo-maven2-plugin</artifactId>
            <configuration>
              <wait>false</wait>
              <container>
                <containerId>jboss4x</containerId>
                <home>${JBOSS_HOME}</home>
                <log>${basedir}/target/jboss4.0/cargo.log</log>
                <output>${basedir}/target/jboss4.0/container.log</output>
              </container>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>jee5</id>
      <dependencies>          
        <dependency>
          <groupId>org.apache.myfaces.core</groupId>
          <artifactId>myfaces-impl</artifactId>
          <scope>provided</scope>
        </dependency>
        <dependency>
          <groupId>org.apache.myfaces.core</groupId>
          <artifactId>myfaces-api</artifactId>
          <scope>provided</scope>
        </dependency>
      </dependencies>
      <build>    
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <version>2.0.2</version>
            <configuration>
              <webXml>${basedir}/src/jee5/web.xml.jee5</webXml>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>    

  </profiles>
  
  <dependencies>    
    <dependency>
      <groupId>org.apache.myfaces.core</groupId>
      <artifactId>myfaces-impl</artifactId>
      <scope>runtime</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.myfaces.core</groupId>
      <artifactId>myfaces-api</artifactId>
      <scope>runtime</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
          <warName>${artifactId}</warName>
        </configuration>
      </plugin>
    </plugins>
  </build>

</project>
