<?xml version="1.0" encoding="UTF-8"?>
<!--
  JBoss, Home of Professional Open Source
  Copyright [2010], Red Hat, Inc., and individual contributors
  by the @authors tag. See the copyright.txt in the distribution for a
  full listing of individual contributors.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  http://www.apache.org/licenses/LICENSE-2.0
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  -->
<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.catch</groupId>
      <artifactId>seam-catch-parent</artifactId>
      <version>3.0.0.Alpha3</version>
      <relativePath>../../pom.xml</relativePath>
   </parent>

   <groupId>org.jboss.seam.catch</groupId>
   <artifactId>seam-catch-example-jaxrs</artifactId>
   <packaging>war</packaging>
   <name>Seam Catch JAX-RS example</name>
   <!-- url required for JAR Manifest -->
   <url>${project.parent.url}</url>

   <properties>
      <jboss.home>${env.JBOSS_HOME}</jboss.home>
      <jboss.domain>default</jboss.domain>
      <seam.rest.version>3.0.0.Alpha2</seam.rest.version>
      <seam.config.version>3.0.0.Beta2</seam.config.version>
      <seam.servlet.version>3.0.0.Alpha3</seam.servlet.version>
      <seam.solder.version>3.0.0.Beta1</seam.solder.version>
   </properties>

   <dependencyManagement>
      <dependencies>
         <dependency>
            <groupId>org.jboss.seam.config</groupId>
            <artifactId>seam-config-xml</artifactId>
            <version>${seam.config.version}</version>
         </dependency>
         <dependency>
            <groupId>org.jboss.seam.rest</groupId>
            <artifactId>seam-rest-api</artifactId>
            <version>${seam.rest.version}</version>
         </dependency>
         <dependency>
            <groupId>org.jboss.seam.rest</groupId>
            <artifactId>seam-rest-impl</artifactId>
            <version>${seam.rest.version}</version>
         </dependency>
         <dependency>
            <groupId>org.jboss.seam.servlet</groupId>
            <artifactId>seam-servlet-api</artifactId>
            <version>${seam.servlet.version}</version>
         </dependency>
         <dependency>
            <groupId>org.jboss.seam.servlet</groupId>
            <artifactId>seam-servlet-impl</artifactId>
            <version>${seam.servlet.version}</version>
         </dependency>
         <dependency>
            <groupId>org.jboss.seam.solder</groupId>
            <artifactId>seam-solder-api</artifactId>
            <version>${seam.solder.version}</version>
         </dependency>
         <dependency>
            <groupId>org.jboss.seam.solder</groupId>
            <artifactId>seam-solder-impl</artifactId>
            <version>${seam.solder.version}</version>
         </dependency>
      </dependencies>
   </dependencyManagement>

   <dependencies>
      <dependency>
         <groupId>org.jboss.spec</groupId>
         <artifactId>jboss-javaee-6.0</artifactId>
         <scope>provided</scope>
         <type>pom</type>
      </dependency>
      <dependency>
         <groupId>org.jboss.seam.rest</groupId>
         <artifactId>seam-rest-api</artifactId>
      </dependency>
      <dependency>
         <groupId>org.jboss.seam.catch</groupId>
         <artifactId>seam-catch-api</artifactId>
      </dependency>
      <dependency>
         <groupId>org.jboss.seam.catch</groupId>
         <artifactId>seam-catch-impl</artifactId>
      </dependency>
      <dependency>
         <groupId>org.jboss.seam.config</groupId>
         <artifactId>seam-config-xml</artifactId>
      </dependency>
      <dependency>
         <groupId>org.jboss.seam.rest</groupId>
         <artifactId>seam-rest-impl</artifactId>
      </dependency>
      <dependency>
         <groupId>org.jboss.seam.solder</groupId>
         <artifactId>seam-solder-api</artifactId>
      </dependency>
      <dependency>
         <groupId>org.jboss.seam.solder</groupId>
         <artifactId>seam-solder-impl</artifactId>
      </dependency>
   </dependencies>

   <build>
      <finalName>seam-catch-example-jaxrs</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>selenium-maven-plugin</artifactId>
            <version>1.0.1</version>
         </plugin>
         <plugin>
            <groupId>org.codehaus.cargo</groupId>
            <artifactId>cargo-maven2-plugin</artifactId>
            <version>1.0</version>
         </plugin>
         <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>failsafe-maven-plugin</artifactId>
         </plugin>
      </plugins>
   </build>

   <profiles>
      <profile>
         <id>jbossas</id>
         <activation>
            <activeByDefault>true</activeByDefault>
         </activation>
         <!-- Mark dependencies provided by JBoss AS -->
         <dependencies>
            <dependency>
               <groupId>org.jboss.logging</groupId>
               <artifactId>jboss-logging</artifactId>
               <scope>provided</scope>
            </dependency>
         </dependencies>

         <build>
            <plugins>
               <!-- JBoss AS deployer plugin will deploy your war to a local JBoss AS container if you've declared $JBOSS_HOME in your OS -->
               <!-- To use, set the JBOSS_HOME environment variable (or jboss.home in $HOME/.m2/settings.xml) and run 'mvn package jboss:hard-deploy' -->
               <plugin>
                  <groupId>org.codehaus.mojo</groupId>
                  <artifactId>jboss-maven-plugin</artifactId>
                  <version>1.4.1</version>
                  <configuration>
                     <jbossHome>${jboss.home}</jbossHome>
                     <serverName>${jboss.domain}</serverName>
                     <fileNames>
                        <!-- JNDI DataSource that connects to in-memory HSQLDB to demonstrate JPA -->
                        <!--
                        <fileName>src/main/resources-jbossas/default-ds.xml</fileName>
                        -->
                        <!-- DataSource needs to go before the application -->
                        <fileName>${project.build.directory}/${project.build.finalName}.war</fileName>
                     </fileNames>
                  </configuration>
               </plugin>
            </plugins>
            <resources>
               <resource>
                  <directory>src/main/resources</directory>
               </resource>
               <resource>
                  <directory>src/main/resources-jbossas</directory>
               </resource>
            </resources>
         </build>
      </profile>

      <profile>
         <id>glassfish</id>
         <build>
            <resources>
               <resource>
                  <directory>src/main/resources</directory>
               </resource>
               <resource>
                  <directory>src/main/resources-glassfish</directory>
               </resource>
            </resources>
         </build>
      </profile>

   </profiles>

</project>
