<?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">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.jboss.seam.config</groupId>
        <artifactId>seam-config-parent</artifactId>
        <version>3.1.0.Beta1</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>

    <artifactId>seam-config-example-princess-rescue</artifactId>
    <packaging>war</packaging>

    <name>Seam Config Example: Princess Rescue (XML)</name>

    <properties>
        <jboss.home>${env.JBOSS_HOME}</jboss.home>
        <jboss.domain>default</jboss.domain>
    </properties>

    <dependencies>

        <dependency>
            <groupId>org.jboss.seam.config</groupId>
            <artifactId>seam-config-xml</artifactId>
        </dependency>

        <!-- Common to JEE and Servlet containers -->
        <dependency>
            <groupId>javax.enterprise</groupId>
            <artifactId>cdi-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.jboss.spec.javax.annotation</groupId>
            <artifactId>jboss-annotations-api_1.1_spec</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <classifier>jdk15</classifier>
        </dependency>

        <dependency>
            <groupId>org.jboss.seam.solder</groupId>
            <artifactId>seam-solder</artifactId>
            <scope>runtime</scope>
        </dependency>

        <!-- Functional test dependencies -->
        <dependency>
            <groupId>org.seleniumhq.selenium.client-drivers</groupId>
            <artifactId>selenium-java-client-driver</artifactId>
            <version>${selenium.java.client.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.jboss.test</groupId>
            <artifactId>richfaces-selenium</artifactId>
            <version>${richfaces.selenium.version}</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <finalName>config-princess-rescue</finalName>
        <plugins>

            <!-- Embedded Jetty (jetty:run) -->
            <plugin>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>maven-jetty-plugin</artifactId>
            </plugin>

            <!-- Embedded Tomcat (package tomcat:run) -->
            <!-- Standalone Tomcat (package tomcat:deploy) -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>tomcat-maven-plugin</artifactId>
            </plugin>
            <!-- No unit tests, surefire would instead run functional tests in incorrect phase -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>distribution</id>
            <activation>
                <property>
                    <name>release</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-assembly-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>javaee</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-war-plugin</artifactId>
                        <configuration>
                            <webXml>${basedir}/src/main/jbossas-resources/web.xml</webXml>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>jboss-maven-plugin</artifactId>
                        <configuration>
                            <jbossHome>${jboss.home}</jbossHome>
                            <serverName>${jboss.domain}</serverName>
                            <fileNames>
                                <fileName>${project.build.directory}/princess-rescue.war</fileName>
                            </fileNames>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>jetty</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <dependencies>
                <!-- JSF 2.0 API -->
                <dependency>
                    <groupId>javax.faces</groupId>
                    <artifactId>jsf-api</artifactId>
                    <version>2.0</version>
                </dependency>

                <dependency>
                    <groupId>org.jboss.weld.servlet</groupId>
                    <artifactId>weld-servlet</artifactId>
                    <scope>runtime</scope>
                </dependency>

                <!-- Mojarra -->
                <dependency>
                    <groupId>com.sun.faces</groupId>
                    <artifactId>jsf-impl</artifactId>
                    <scope>runtime</scope>
                </dependency>
            </dependencies>
        </profile>
    </profiles>

</project>
