<?xml version="1.0" encoding="UTF-8"?>
<!--
  JBoss, Home of Professional Open Source
  Copyright 2010, Red Hat Middleware LLC, 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>
        <artifactId>seam-servlet-parent</artifactId>
        <groupId>org.jboss.seam.servlet</groupId>
        <version>3.0.0.CR3</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <artifactId>seam-servlet-impl</artifactId>

    <packaging>jar</packaging>
    <name>Seam Servlet Implementation</name>
    <!-- url required for JAR Manifest -->
    <url>${project.parent.url}</url>

    <properties>
        <jboss.javaee.spec.version>1.0.0.Final</jboss.javaee.spec.version>
    </properties>
    
    <dependencies>
        <!-- Annotation processor for generating typed loggers -->
        <dependency>
            <groupId>org.jboss.seam.solder</groupId>
            <artifactId>seam-solder-tooling</artifactId>
            <scope>provided</scope>
            <optional>true</optional>
            <exclusions>
               <exclusion>
                  <groupId>org.jboss.seam.solder</groupId>
                  <artifactId>seam-solder-api</artifactId>
               </exclusion>
            </exclusions>
        </dependency>

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

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

        <dependency>
            <groupId>org.jboss.seam.catch</groupId>
            <artifactId>seam-catch-api</artifactId>
            <!-- FIX THIS -->
            <version>3.0.0.CR2</version>
            <scope>provided</scope>
        </dependency>

        <!-- Test Dependencies -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian</groupId>
            <artifactId>arquillian-junit</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <!-- Next two plugins configure 1.6 behavior for 1.5 compiler -->
            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <id>generate-sources</id>
                        <phase>generate-sources</phase>
                        <configuration>
                            <tasks>
                                <mkdir dir="${project.build.directory}/generated-sources/annotations" />
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <compilerArguments>
                        <s>${project.build.directory}/generated-sources/annotations</s>
                    </compilerArguments>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>default</id>
            <activation>
                <property>
                    <name>!arquillian</name>
                </property>
            </activation>
            <dependencies>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <skip>true</skip>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <!--
        <profile>
            <id>default</id>
            <activation>
                <property>
                    <name>!arquillian</name>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.arquillian.container</groupId>
                    <artifactId>arquillian-weld-ee-embedded-1.1</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.jboss.spec</groupId>
                    <artifactId>jboss-javaee-6.0</artifactId>
                    <type>pom</type>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>org.jboss.weld</groupId>
                    <artifactId>weld-core</artifactId>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-simple</artifactId>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        -->

        <profile>
            <!-- To run tests, you must add -Djboss.i18n.generate-proxies=true to JBoss AS startup script -->
            <id>arq-jbossas-remote</id>
            <activation>
                <property>
                    <name>arquillian</name>
                    <value>jbossas-remote</value>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.arquillian.container</groupId>
                    <artifactId>arquillian-jbossas-remote-6</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.jboss.spec</groupId>
                    <artifactId>jboss-javaee-6.0</artifactId>
                    <version>${jboss.javaee.spec.version}</version>
                    <type>pom</type>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>org.jboss.jbossas</groupId>
                    <artifactId>jboss-as-client</artifactId>
                    <type>pom</type>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>org.jboss.weld</groupId>
                    <artifactId>weld-core</artifactId>
                    <scope>test</scope>
                </dependency>
            </dependencies>
            <build>
                <testResources>
                    <testResource>
                        <directory>src/test/resources</directory>
                    </testResource>
                    <testResource>
                        <directory>src/test/resources-jbossas</directory>
                    </testResource>
                </testResources>
            </build>
        </profile>
        <profile>
            <id>arq-jbossas-managed</id>
            <activation>
                <property>
                    <name>arquillian</name>
                    <value>jbossas-managed</value>
                </property>
            </activation>
            <properties>
                <bindAddress>localhost</bindAddress>
                <httpPort>8080</httpPort>
            </properties>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.arquillian.container</groupId>
                    <artifactId>arquillian-jbossas-managed-6</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.jboss.spec</groupId>
                    <artifactId>jboss-javaee-6.0</artifactId>
                    <version>${jboss.javaee.spec.version}</version>
                    <type>pom</type>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>org.jboss.jbossas</groupId>
                    <artifactId>jboss-server-manager</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.jboss.jbossas</groupId>
                    <artifactId>jboss-as-client</artifactId>
                    <type>pom</type>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>org.jboss.weld</groupId>
                    <artifactId>weld-core</artifactId>
                    <scope>test</scope>
                </dependency>
            </dependencies>
            <build>
                <testResources>
                    <testResource>
                        <directory>src/test/resources</directory>
                    </testResource>
                    <testResource>
                        <directory>src/test/resources-jbossas</directory>
                    </testResource>
                </testResources>
            </build>
        </profile>
        <profile>
            <id>arq-glassfish-embedded</id>
            <activation>
                <property>
                    <name>arquillian</name>
                    <value>glassfish-embedded</value>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.arquillian.container</groupId>
                    <artifactId>arquillian-glassfish-embedded-3</artifactId>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>code-coverage</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-dependency-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>emma-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-antrun-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.maven.plugin</groupId>
                        <artifactId>emma4it-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
