<?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>mail</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.mail</groupId>
    <artifactId>mail-web</artifactId>
    <packaging>war</packaging>
    <name>Mail Web Module (EE6)</name>
    
    <properties>
        <!-- filtering property for components.xml -->
        <jndiPattern>seam-mail/#{ejbName}/local</jndiPattern>
    </properties>
    
    <dependencies>
        <dependency>
            <groupId>org.jboss.seam.examples-ee6.mail</groupId>
            <artifactId>mail-ejb</artifactId>
            <type>ejb</type>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.seam</groupId>
            <artifactId>jboss-seam</artifactId>
            <type>ejb</type>
        </dependency>
        <dependency>
            <groupId>org.jboss.seam</groupId>
            <artifactId>jboss-seam-mail</artifactId>
            <exclusions>
            	<exclusion>
            		<artifactId>jboss-seam-ui</artifactId>
            		<groupId>org.jboss.seam</groupId>
            	</exclusion>
            	<exclusion>
            		<artifactId>jsf-facelets</artifactId>
            		<groupId>com.sun.facelets</groupId>
            	</exclusion>
            	<exclusion>
            		<artifactId>jboss-seam</artifactId>
            		<groupId>org.jboss.seam</groupId>
            	</exclusion>
                <exclusion>
                    <groupId>javax.faces</groupId>
                    <artifactId>jsf-api</artifactId>
                </exclusion>
            </exclusions>
        </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>org.jboss.seam</groupId>
            <artifactId>jboss-seam-debug</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.seam</groupId>
            <artifactId>jboss-seam-pdf</artifactId>
            <exclusions>
            	<exclusion>
            		<artifactId>jboss-seam-ui</artifactId>
            		<groupId>org.jboss.seam</groupId>
            	</exclusion>
            	<exclusion>
            		<artifactId>jsf-facelets</artifactId>
            		<groupId>com.sun.facelets</groupId>
            	</exclusion>
            	<exclusion>
            		<artifactId>jboss-seam</artifactId>
            		<groupId>org.jboss.seam</groupId>
            	</exclusion>
                <exclusion>
                    <groupId>javax.faces</groupId>
                    <artifactId>jsf-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.jboss.seam</groupId>
            <artifactId>jboss-seam-excel</artifactId>
            <exclusions>
            	<exclusion>
            		<artifactId>jboss-seam-ui</artifactId>
            		<groupId>org.jboss.seam</groupId>
            	</exclusion>
            	<exclusion>
            		<artifactId>jsf-facelets</artifactId>
            		<groupId>com.sun.facelets</groupId>
            	</exclusion>
            	<exclusion>
            		<artifactId>jboss-seam</artifactId>
            		<groupId>org.jboss.seam</groupId>
            	</exclusion>
                <exclusion>
                    <groupId>javax.faces</groupId>
                    <artifactId>jsf-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
<!--         <dependency> -->
<!--             <groupId>com.sun.facelets</groupId> -->
<!--             <artifactId>jsf-facelets</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.mail</groupId>
                    <artifactId>mail-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-mail</finalName>
                <plugins>
                    <plugin>
                    <artifactId>maven-resources-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>copy-resources</id>
                                <phase>validate</phase>
                                <goals>
                                    <goal>copy-resources</goal>
                                </goals>
                                <configuration>
                                    <outputDirectory>${basedir}/target/classes</outputDirectory>
                                    <resources>          
                                        <resource>
                                            <directory>${basedir}/../mail-ear/src/main/resources</directory>
                                            <includes>
                                                <include>jboss-seam-mail-ds.xml</include>
                                            </includes>
                                        </resource>
                                  </resources>              
                                </configuration>            
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
