<?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.1.0.Final</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>

    <artifactId>seam-rest-example-tasks</artifactId>
    <packaging>war</packaging>
    <name>Seam REST Tasks 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>

        <dependency>
            <groupId>org.hibernate.javax.persistence</groupId>
            <artifactId>hibernate-jpa-2.0-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.jboss.spec.javax.ejb</groupId>
            <artifactId>jboss-ejb-api_3.1_spec</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.jboss.spec.javax.servlet</groupId>
            <artifactId>jboss-servlet-api_3.0_spec</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- Runtime dependencies -->

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

        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-jaxrs</artifactId>
        </dependency>
        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-xc</artifactId>
        </dependency>

        <dependency>
            <groupId>org.freemarker</groupId>
            <artifactId>freemarker</artifactId>
            <scope>compile</scope>
        </dependency>

        <!-- Test dependencies -->
        <dependency>
            <groupId>commons-httpclient</groupId>
            <artifactId>commons-httpclient</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.jboss.arquillian.junit</groupId>
            <artifactId>arquillian-junit-container</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- Arquillian Drone support in Arquillian tests -->
        <dependency>
            <groupId>org.jboss.arquillian.extension</groupId>
            <artifactId>arquillian-drone-impl</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- Support for Selenium in Arquillian Drone -->
        <dependency>
            <groupId>org.jboss.arquillian.extension</groupId>
            <artifactId>arquillian-drone-selenium</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- Support for Selenium Server in Arquillian Drone -->
        <!-- Required only if you want Arquillian to control Selenium Server life cycle -->
        <dependency>
            <groupId>org.jboss.arquillian.extension</groupId>
            <artifactId>arquillian-drone-selenium-server</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- Selenium -->
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- Selenium Server -->
        <!-- Required only if you want Arquillian to control Selenium Server life cycle -->
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-server</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.jboss.arquillian.ajocado</groupId>
            <artifactId>arquillian-ajocado-junit</artifactId>
            <type>pom</type>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <finalName>rest-tasks</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>
        </plugins>
    </build>

    <!-- Build profiles -->
    <profiles>
        <profile>
            <id>resin</id>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.resteasy</groupId>
                    <artifactId>resteasy-jaxb-provider</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.jboss.resteasy</groupId>
                    <artifactId>resteasy-jaxrs</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.jboss.resteasy</groupId>
                    <artifactId>resteasy-cdi</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.hsqldb</groupId>
                    <artifactId>hsqldb</artifactId>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-war-plugin</artifactId>
                        <configuration>
                            <webResources>
                                <resource>
                                    <directory>src/main/resin</directory>
                                </resource>
                            </webResources>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>jbossas6</id>
            <activation>
                <property>
                    <name>arquillian</name>
                    <value>jbossas-managed-6</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-war-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>package-jboss</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>war</goal>
                                </goals>
                                <configuration>
                                    <useCache>false</useCache>
                                    <warSourceDirectory>src/main/jboss6</warSourceDirectory>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>jbossas7</id>
            <activation>
                <activeByDefault>true</activeByDefault>
                <property>
                    <name>arquillian</name>
                    <value>jbossas-managed-7</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-war-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>package-jboss</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>war</goal>
                                </goals>
                                <configuration>
                                    <useCache>false</useCache>
                                    <warSourceDirectory>src/main/jboss7</warSourceDirectory>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>velocity</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-war-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>package-velocity</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>war</goal>
                                </goals>
                                <configuration>
                                    <useCache>false</useCache>
                                    <warSourceDirectory>src/main/velocity</warSourceDirectory>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
            <dependencies>
                <dependency>
                    <groupId>org.apache.velocity</groupId>
                    <artifactId>velocity</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.apache.velocity</groupId>
                    <artifactId>velocity-tools</artifactId>
                </dependency>
                <!-- exclude freemarker -->
                <dependency>
                    <groupId>org.freemarker</groupId>
                    <artifactId>freemarker</artifactId>
                    <scope>provided</scope>
                </dependency>
            </dependencies>
        </profile>

        <profile>
            <id>glassfish</id>
            <activation>
                <property>
                    <name>arquillian</name>
                    <value>glassfish-remote-3.1</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-war-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>package-jboss</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>war</goal>
                                </goals>
                                <configuration>
                                    <useCache>false</useCache>
                                    <warSourceDirectory>src/main/glassfish</warSourceDirectory>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <!-- Functional test profiles -->
        <profile>
            <id>ftest</id>
            <activation>
                <property>
                    <name>arquillian</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-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>
        </profile>

        <profile>
            <id>jbossas-managed-6</id>
            <activation>
                <property>
                    <name>arquillian</name>
                    <value>jbossas-managed-6</value>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.seam.test</groupId>
                    <artifactId>jbossas-managed-6</artifactId>
                    <type>pom</type>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>

        <profile>
            <id>jbossas-remote-6</id>
            <activation>
                <property>
                    <name>arquillian</name>
                    <value>jbossas-remote-6</value>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.seam.test</groupId>
                    <artifactId>jbossas-remote-6</artifactId>
                    <type>pom</type>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>jbossas-remote-7</id>
            <activation>
                <property>
                    <name>arquillian</name>
                    <value>jbossas-remote-7</value>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.seam.test</groupId>
                    <artifactId>jbossas-remote-7</artifactId>
                    <type>pom</type>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>jbossas-managed-7</id>
            <activation>
                <property>
                    <name>arquillian</name>
                    <value>jbossas-managed-7</value>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.seam.test</groupId>
                    <artifactId>jbossas-managed-7</artifactId>
                    <type>pom</type>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>glassfish-remote-3.1</id>
            <activation>
                <property>
                    <name>arquillian</name>
                    <value>glassfish-remote-3.1</value>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.seam.test</groupId>
                    <artifactId>glassfish-remote-3.1</artifactId>
                    <type>pom</type>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>openshift-express</id>
            <activation>
                <property>
                    <name>arquillian</name>
                    <value>openshift-express</value>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.seam.test</groupId>
                    <artifactId>openshift-express</artifactId>
                    <type>pom</type>
                    <scope>test</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>

