<?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>myfaces-base</artifactId>
        <groupId>org.apache.myfaces</groupId>
        <version>1.2.10-SNAPSHOT</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.apache.myfaces</groupId>
    <artifactId>test-webapp</artifactId>
    <packaging>war</packaging>
    <name>Example test webapp to test myfaces 1.2</name>
    <version>1.2.10-SNAPSHOT</version>
    <url>http://www.myorganization.org</url>
    <build>
        <finalName>test-webapp</finalName>
        <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
                 <configuration>
                     <source>1.5</source>
                     <target>1.5</target>
                 </configuration>
             </plugin>
            <plugin>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>maven-jetty-plugin</artifactId>
                <version>6.1.5</version>
                <!--<configuration>
                    <scanIntervalSeconds>10</scanIntervalSeconds>
                </configuration>-->
            </plugin>
            <plugin>
                <groupId>org.codehaus.cargo</groupId>
                <artifactId>cargo-maven2-plugin</artifactId>

                <configuration>
                    <wait>true</wait>
                    <container>
                        <containerId>tomcat5x</containerId>
                        <home>${catalina.home}</home>
                        <zipUrlInstaller>
                           <url>http://mirrors.ibiblio.org/pub/mirrors/apache/tomcat/tomcat-6/v6.0.13/bin/apache-tomcat-6.0.13.zip</url>
                           <installDir>${project.build.directory}/tomcat-zip</installDir>
                        </zipUrlInstaller>
                        <log>target/tomcat5x.log</log>
                        <output>target/tomcat5x.out</output>
                    </container>
                    <configuration>
                        <home>target/tomcat5x</home>
                        <properties>
                            <cargo.servlet.port>8080</cargo.servlet.port>
                        </properties>
                        <deployables>
                            <deployable>  
                                <location>target/${artifactId}</location>
                                <properties>
                                    <context>${artifactId}</context>
                                </properties>
                            </deployable>
                        </deployables>
                    </configuration>

                </configuration>
                <!--<executions>-->
                    <!--<execution>-->
                        <!--<id>start-container</id>-->
                        <!--<phase>validate</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>

    <profiles>
        <profile>
            <id>myfaces</id>
            <activation>
                <property>
                    <name>!jsf</name>
                </property>
            </activation>
            <dependencies>
                <!--
                  The compile scope is wrong! JavaEE5 containers provide a JSF impl.
                  The Tomcat servlet container does not do this.
                -->
                <dependency>
                    <groupId>org.apache.myfaces.core</groupId>
                    <artifactId>myfaces-api</artifactId>
                    <version>1.2.10-SNAPSHOT</version>
                    <scope>compile</scope>
                </dependency>
                <dependency>
                    <groupId>org.apache.myfaces.core</groupId>
                    <artifactId>myfaces-impl</artifactId>
                    <version>1.2.10-SNAPSHOT</version>
                    <scope>compile</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>jsf-ri</id>
            <activation>
                <property>
                    <name>jsf</name>
                    <value>ri</value>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>javax.faces</groupId>
                    <artifactId>jsf-api</artifactId>
                    <version>1.2_13</version>
                </dependency>
                <dependency>
                    <groupId>javax.faces</groupId>
                    <artifactId>jsf-impl</artifactId>
                    <version>1.2_13</version>
                </dependency>
            </dependencies>
        </profile>
    </profiles>

    <dependencies>

        <dependency>
          <groupId>org.apache.myfaces.tomahawk</groupId>
          <artifactId>tomahawk</artifactId>
          <version>1.1.10-SNAPSHOT</version>
          <scope>compile</scope>
        </dependency>

        <!--<dependency>-->
            <!--<groupId>com.sun.facelets</groupId>-->
            <!--<artifactId>jsf-facelets</artifactId>-->
            <!--<version>1.1.12</version>-->
        <!--</dependency>-->

        <!-- depends on container -->
        <!--<dependency>
            <groupId>javax.el</groupId>
            <artifactId>el-api</artifactId>
            <version>1.0</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.sun.el</groupId>
            <artifactId>el-ri</artifactId>
            <version>1.0</version>
            <optional>true</optional>
        </dependency>-->

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.5</version>
            <scope>provided</scope>
        </dependency>
        
        <dependency>
            <groupId>javax.servlet.jsp</groupId>
            <artifactId>jsp-api</artifactId>
            <version>2.1</version>
            <scope>provided</scope>
        </dependency>
        
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-annotation_1.0_spec</artifactId>
            <scope>provided</scope>
            <version>1.0</version>
        </dependency>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
            <version>1.2</version>
        </dependency>
        <dependency>
            <groupId>taglibs</groupId>
            <artifactId>standard</artifactId>
            <version>1.1.2</version>
        </dependency>
        <!--
        <dependency>
            <groupId>org.ajax4jsf</groupId>
            <artifactId>ajax4jsf</artifactId>
            <version>1.0.4</version>
        </dependency>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
            <version>1.2</version>
            <exclusions>
                <exclusion>
                    <artifactId>jsp-api</artifactId>
                    <groupId>javax.servlet</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        -->
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.12</version>
        </dependency>
        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>1.1.1</version>
        </dependency>
    </dependencies>
    
    <repositories>

        <repository>
          <id>java.net</id>
          <url>http://download.java.net/maven/2</url>
        </repository>
        <repository>
            <id>java.net.1</id>
            <url>http://download.java.net/maven/1</url>
            <layout>legacy</layout>
        </repository>
     
        <repository>
            <id>apache.snapshots</id>
            <name>Apache Snapshot Repository</name>
            <url>http://people.apache.org/repo/m2-snapshot-repository</url>
        </repository>

    </repositories>
</project>
