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

   <groupId>org.jboss.seam.catch</groupId>
   <artifactId>seam-catch-example-basic-servlet</artifactId>
   <packaging>war</packaging>
   <name>Seam Catch Basic Servlet Example</name>
   <!-- url required for JAR Manifest -->

   <properties>
      <jboss.home>${env.JBOSS_HOME}</jboss.home>
      <jboss.domain>default</jboss.domain>
      <jboss.spec.servlet.version>1.0.0.Final</jboss.spec.servlet.version>
      <jstl.version>1.2</jstl.version>
   </properties>

   <dependencyManagement>
      <dependencies>
         <dependency>
            <!-- Required until the Servlet 3.0 API can be resolved in Central -->
            <groupId>org.jboss.spec.javax.servlet</groupId>
            <artifactId>jboss-servlet-api_3.0_spec</artifactId>
            <version>${jboss.spec.servlet.version}</version>
         </dependency>
         <dependency>
            <groupId>jstl</groupId>
            <artifactId>jstl</artifactId>
            <version>${jstl.version}</version>
         </dependency>
      </dependencies>
   </dependencyManagement>

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

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

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

      <dependency>
         <groupId>jstl</groupId>
         <artifactId>jstl</artifactId>
         <scope>compile</scope>
      </dependency>
      <dependency>
         <groupId>org.seleniumhq.selenium.client-drivers</groupId>
         <artifactId>selenium-java-client-driver</artifactId>
         <scope>test</scope>
      </dependency>

      <dependency>
         <groupId>org.jboss.test</groupId>
         <artifactId>richfaces-selenium</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.testng</groupId>
         <artifactId>testng</artifactId>
         <version>${ftest.testng.version}</version>
         <scope>test</scope>
      </dependency>
   </dependencies>

   <build>
      <finalName>catch-basic-servlet</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.apache.maven.plugins</groupId>
           <artifactId>maven-compiler-plugin</artifactId>
           <version>2.0.2</version>
           <configuration>
             <source>1.6</source>
             <target>1.6</target>
           </configuration>
         </plugin>
      </plugins>
   </build>

   <profiles>
      <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>   
   
      <profile>
         <id>jbossas</id>
         <activation>
            <activeByDefault>true</activeByDefault>
         </activation>

         <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>
                  </configuration>
               </plugin>
            </plugins>
         </build>
      </profile>
      <profile>
         <id>ftest</id>
      </profile>
   </profiles>

</project>
