<?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>spring</artifactId>
        <groupId>org.jboss.seam.examples</groupId>
        <version>2.3.0-SNAPSHOT</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    
    <groupId>org.jboss.seam.examples</groupId>
    <artifactId>spring-web</artifactId>
    <packaging>war</packaging>
    <name>Spring Web Module</name>
    
    <dependencies>
        <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>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-ioc</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>jboss</groupId>
                    <artifactId>jboss-jmx</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>com.sun.facelets</groupId>
            <artifactId>jsf-facelets</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
        </dependency>
        <dependency>
            <groupId>org.richfaces.framework</groupId>
            <artifactId>richfaces-impl</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>commons-collections</groupId>
                    <artifactId>commons-collections</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.richfaces.ui</groupId>
            <artifactId>richfaces-ui</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>commons-collections</groupId>
                    <artifactId>commons-collections</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.jboss.el</groupId>
            <artifactId>jboss-el</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.persistence</groupId>
            <artifactId>persistence-api</artifactId>
            <version>1.0</version>
        </dependency>
        <dependency>
            <groupId>javax.faces</groupId>
            <artifactId>jsf-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring</artifactId>
        </dependency>
        <dependency>
            <groupId>cglib</groupId>
            <artifactId>cglib-nodep</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>
  
    <build>
        <finalName>jboss-seam-spring</finalName>
        <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>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>jboss-maven-plugin</artifactId>
                <configuration>
                    <jbossHome>${jboss.home}</jbossHome>
                    <serverName>${jboss.domain}</serverName>
                     <fileNames>
                        <directory>${project.build.directory}/${project.build.finalName}.war</directory>
                    </fileNames>
                </configuration>
            </plugin>
        </plugins>
    </build>
  
    <profiles>
        <profile>
            <id>jbossas6</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>build-helper-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>add-source</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>add-source</goal>
                                </goals>
                                <configuration>
                                    <sources>
                                        <source>src/jboss6/java</source>
                                    </sources>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>remove-redundant-classes</id>
                                <phase>prepare-package</phase>
                                <configuration>
                                    <tasks>
                                        <delete dir="${project.build.outputDirectory}/javax" failonerror="false" />
                                    </tasks>
                                </configuration>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>wait-for-application</id>
                                <phase>none</phase>
                            </execution>
                            <execution>
                                <id>stop-selenium</id>
                                <phase>none</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>jbossas42</id>
            <dependencies>
                <dependency>
                    <groupId>org.hibernate</groupId>
                    <artifactId>hibernate-validator</artifactId>
                    <scope>compile</scope>
                    <exclusions>
                        <exclusion>
                            <groupId>antlr</groupId>
                            <artifactId>antlr</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>dom4j</groupId>
                            <artifactId>dom4j</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>javax.transaction</groupId>
                            <artifactId>jta</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
                <dependency>
                    <groupId>org.hibernate</groupId>
                    <artifactId>hibernate-annotations</artifactId>
                    <scope>compile</scope>
                    <exclusions>
                        <exclusion>
                            <groupId>org.hibernate</groupId>
                            <artifactId>ejb3-persistence</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>dom4j</groupId>
                            <artifactId>dom4j</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
                <dependency>
                    <groupId>org.hibernate</groupId>
                    <artifactId>hibernate-entitymanager</artifactId>
                    <scope>compile</scope>
                    <exclusions>
                        <exclusion>
                            <groupId>org.hibernate</groupId>
                            <artifactId>ejb3-persistence</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>dom4j</groupId>
                            <artifactId>dom4j</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>javax.transaction</groupId>
                            <artifactId>jta</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>javassist</groupId>
                            <artifactId>javassist</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
                <dependency>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-log4j12</artifactId>
                    <scope>compile</scope>
                </dependency>
                <dependency>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                    <scope>compile</scope>
                </dependency>
            </dependencies>
        </profile>
    </profiles>
</project>
