<?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>
        <artifactId>messages</artifactId>
        <groupId>org.jboss.seam.examples-ee6</groupId>
        <version>2.3.0.Beta1</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    
    <groupId>org.jboss.seam.examples-ee6.messages</groupId>
    <artifactId>messages-web</artifactId>
    <packaging>war</packaging>
    <name>Messages Web Module (EE6)</name>

    <properties>
        <!-- filtering property for components.xml -->
        <jndiPattern>java:app/messages-ejb/#{ejbName}</jndiPattern>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.jboss.seam.examples-ee6.messages</groupId>
            <artifactId>messages-ejb</artifactId>
            <type>ejb</type>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.seam</groupId>
            <artifactId>jboss-seam-ui</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.jboss.seam</groupId>
                    <artifactId>jboss-seam-jul</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>commons-beanutils</groupId>
            <artifactId>commons-beanutils</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>commons-collections</groupId>
                    <artifactId>commons-collections</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <webResources>
                        <resource>
                            <directory>src/main/webapp</directory>
                            <filtering>true</filtering>
                        </resource>
                    </webResources>
                </configuration>
            </plugin>
        </plugins>
    </build>
    
    <profiles>
        <profile>
            <id>tomcat</id>
            <properties>
                <!-- filtering property for components.xml -->
                <jndiPattern>#{ejbName}/local</jndiPattern>
            </properties>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.seam.examples-ee6</groupId>
                    <artifactId>messages-ejb</artifactId>
                    <type>ejb</type>
                    <scope>compile</scope>
                </dependency>
                <dependency>
                    <groupId>org.jboss.seam</groupId>
                    <artifactId>jboss-seam</artifactId>
                    <type>ejb</type>
                    <scope>compile</scope>
                    <exclusions>
                        <exclusion>
                            <groupId>com.thoughtworks.xstream</groupId>
                            <artifactId>xstream</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>xpp3</groupId>
                            <artifactId>xpp3_min</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
                <dependency>
                    <groupId>javax.faces</groupId>
                    <artifactId>jsf-api</artifactId>
                    <scope>compile</scope>
                </dependency>
                <dependency>
                    <groupId>javax.faces</groupId>
                    <artifactId>jsf-impl</artifactId>
                    <scope>compile</scope>
                </dependency>
            </dependencies>
            <build>
                <finalName>jboss-seam-messages</finalName>
            </build>
        </profile>
    </profiles>

</project>
