<?xml version="1.0"?>
<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.rest</groupId>
        <artifactId>seam-rest-parent</artifactId>
        <version>3.0.0.CR2</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>

    <groupId>org.jboss.seam.rest</groupId>
    <artifactId>seam-rest-example-exceptions</artifactId>
    <packaging>war</packaging>
    <version>3.0.0.CR2</version>
    <name>Seam REST Exceptions Example</name>
    <url>http://seamframework.org/Seam3/RESTModule</url>

    <dependencies>
        <!-- APIs -->
        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>jaxrs-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- Runtime dependencies -->
        <dependency>
            <groupId>org.jboss.seam.config</groupId>
            <artifactId>seam-config-xml</artifactId>
            <!-- Because we use the combined jar -->
            <exclusions>
                <exclusion>
                    <groupId>org.jboss.seam.solder</groupId>
                    <artifactId>seam-solder-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.jboss.seam.solder</groupId>
                    <artifactId>seam-solder-impl</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.jboss.seam.rest</groupId>
            <artifactId>seam-rest-api</artifactId>
        </dependency>

        <dependency>
            <groupId>org.jboss.seam.rest</groupId>
            <artifactId>seam-rest-impl</artifactId>
        </dependency>

        <dependency>
            <groupId>org.jboss.seam.catch</groupId>
            <artifactId>seam-catch</artifactId>
        </dependency>

        <!-- Test dependencies -->
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>commons-httpclient</groupId>
            <artifactId>commons-httpclient</artifactId>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <finalName>rest-exceptions</finalName>
        <plugins>
            <plugin>
                <!-- no unit tests, surefire would instead run functional tests in incorrect phase -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>failsafe-maven-plugin</artifactId>
                <configuration>
                    <includes>
                        <include>**/*Test.java</include>
                    </includes>
                </configuration>
                <executions>
                    <execution>
                        <id>integration-test</id>
                        <phase>integration-test</phase>
                        <goals>
                            <goal>integration-test</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>verify</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>glassfish</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-simple</artifactId>
                </dependency>
                <!-- Exclude catch from GF for now -->
                <dependency>
                    <groupId>org.jboss.seam.catch</groupId>
                    <artifactId>seam-catch</artifactId>
                    <scope>provided</scope>
                </dependency>
            </dependencies>

        </profile>
        <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>
    </profiles>
</project>

