<?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>
      <groupId>org.jboss.seam.solder</groupId>
      <artifactId>seam-solder-parent</artifactId>
      <version>3.1.0.Beta2</version>
      <relativePath>../pom.xml</relativePath>
   </parent>

   <artifactId>seam-solder</artifactId>
   <packaging>jar</packaging>

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

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

      <!-- Annotation processor for generating typed loggers -->
      <dependency>
         <groupId>org.jboss.seam.solder</groupId>
         <artifactId>seam-solder-tooling</artifactId>
         <optional>true</optional>
      </dependency>

      <dependency>
         <groupId>javax.enterprise</groupId>
         <artifactId>cdi-api</artifactId>
         <scope>provided</scope>
      </dependency>

      <dependency>
         <groupId>org.jboss.spec.javax.el</groupId>
         <artifactId>jboss-el-api_2.2_spec</artifactId>
         <scope>provided</scope>
      </dependency>

      <!-- The Servlet spec is used for compiling the ResourceLoader Servlet integration -->
      <dependency>
         <groupId>org.jboss.spec.javax.servlet</groupId>
         <artifactId>jboss-servlet-api_3.0_spec</artifactId>
         <optional>true</optional>
         <scope>provided</scope>
      </dependency>

      <!-- Javassist is required for service handlers, unwrapping producers and type-safe loggers -->
      <dependency>
         <groupId>org.javassist</groupId>
         <artifactId>javassist</artifactId>
         <scope>provided</scope>
         <optional>true</optional>
      </dependency>

      <dependency>
         <groupId>log4j</groupId>
         <artifactId>log4j</artifactId>
         <version>1.2.16</version>
         <scope>provided</scope>
         <optional>true</optional>
      </dependency>

      <dependency>
         <groupId>org.slf4j</groupId>
         <artifactId>slf4j-api</artifactId>
         <scope>provided</scope>
         <optional>true</optional>
      </dependency>

      <!-- EL impl needed for ElTest -->
      <dependency>
         <groupId>org.glassfish.web</groupId>
         <artifactId>el-impl</artifactId>
         <scope>test</scope>
      </dependency>

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

      <dependency>
         <groupId>junit</groupId>
         <artifactId>junit-dep</artifactId>
      </dependency>

      <dependency>
         <groupId>org.slf4j</groupId>
         <artifactId>slf4j-simple</artifactId>
         <scope>test</scope>
      </dependency>
      
            <!-- Test Compile ClassPath -->
            <dependency>
                <groupId>org.jboss.arquillian.junit</groupId>
                <artifactId>arquillian-junit-container</artifactId>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <scope>test</scope>
            </dependency>         

      <dependency>
         <groupId>org.hamcrest</groupId>
         <artifactId>hamcrest-core</artifactId>
      </dependency>

   </dependencies>

   <build>
      <plugins>
         <!-- Perform all tests in integration-test phase -->
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
               <skip>true</skip>
            </configuration>
            <executions>
               <execution>
                  <id>surefire-it</id>
                  <phase>integration-test</phase>
                  <goals>
                     <goal>test</goal>
                  </goals>
                  <configuration>
                     <skip>false</skip>
                  </configuration>
               </execution>
            </executions>
         </plugin>

         <!-- This plugin config is used to set the Dependencies entry in META-INF/MANIFEST.MF so that in AS7
              both JBoss Logging and the JBoss Log manager will be available -->
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <configuration>
               <archive>
                  <manifestEntries>
                     <Dependencies>org.jboss.logging,org.jboss.logmanager</Dependencies>
                  </manifestEntries>
               </archive>
            </configuration>
         </plugin>

      </plugins>
   </build>

   <profiles>
      <profile>
         <id>default</id>
         <activation>
            <activeByDefault>true</activeByDefault>
            <property>
               <name>default</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.javax.transaction</groupId>
               <artifactId>jboss-transaction-api_1.1_spec</artifactId>
               <scope>test</scope>
            </dependency>

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

            <dependency>
               <groupId>javax.validation</groupId>
               <artifactId>validation-api</artifactId>
               <scope>test</scope>
            </dependency>

            <dependency>
               <groupId>org.jboss.weld</groupId>
               <artifactId>weld-core</artifactId>
               <scope>test</scope>
            </dependency>

         </dependencies>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-surefire-plugin</artifactId>
                  <configuration>
                     <excludes>
                        <!-- typed message logger & bundle support requires extension loading supported
                             added to the Weld EE Embedded adapter in Arquillian 1.0.0.Alpha5 (still need to verify) -->
                        <exclude>org/jboss/seam/solder/test/messages/TypedMessageBundleInjectionTest.java</exclude>
                        <exclude>org/jboss/seam/solder/test/logging/LoggerInjectionTest.java</exclude>
                        <exclude>org/jboss/seam/solder/test/logging/TypedMessageLoggerInjectionTest.java</exclude>
                     </excludes>
                  </configuration>
               </plugin>
            </plugins>
         </build>
      </profile>
      <profile>
         <id>openwebbeans</id>
         <activation>
            <activeByDefault>false</activeByDefault>
            <property>
               <name>openwebbeans</name>
            </property>
         </activation>
         <dependencies>

            <dependency>
               <groupId>org.jboss.arquillian.container</groupId>
               <artifactId>arquillian-openwebbeans-embedded-1</artifactId>
               <version>${version.arquillian}</version>
            </dependency>

	    <dependency>
	       <groupId>org.apache.openwebbeans</groupId>
	       <artifactId>openwebbeans-spi</artifactId>
	    </dependency>

	    <dependency>
	       <groupId>org.apache.openwebbeans</groupId>
	       <artifactId>openwebbeans-impl</artifactId>
	    </dependency>

	    <dependency>
	       <groupId>org.apache.geronimo.specs</groupId>
	       <artifactId>geronimo-el_2.2_spec</artifactId>
	    </dependency>

	    <dependency>
	       <groupId>org.apache.geronimo.specs</groupId>
	       <artifactId>geronimo-jta_1.1_spec</artifactId>
	    </dependency>

	    <dependency>
	       <groupId>org.apache.geronimo.specs</groupId>
	       <artifactId>geronimo-validation_1.0_spec</artifactId>
	    </dependency>

	    <dependency>
	       <groupId>org.apache.geronimo.specs</groupId>
	       <artifactId>geronimo-interceptor_1.1_spec</artifactId>
	    </dependency>

	    <dependency>
	       <groupId>org.apache.geronimo.specs</groupId>
	       <artifactId>geronimo-jcdi_1.0_spec</artifactId>
	    </dependency>

	    <dependency>
	       <groupId>org.apache.geronimo.specs</groupId>
	       <artifactId>geronimo-atinject_1.0_spec</artifactId>
	    </dependency>

	    <dependency>
	       <groupId>org.apache.geronimo.specs</groupId>
	       <artifactId>geronimo-servlet_2.5_spec</artifactId>
	    </dependency>

	 </dependencies>

	 <dependencyManagement>
	    <dependencies>
	       <dependency>
	       <groupId>org.apache.openwebbeans</groupId>
	          <artifactId>openwebbeans</artifactId>
	          <version>1.0.0</version>
	          <type>pom</type>
	          <scope>import</scope>
	       </dependency>
	    </dependencies>
         </dependencyManagement>

         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-surefire-plugin</artifactId>
                  <configuration>
                     <excludes>
                        <!-- typed message logger & bundle support requires extension loading supported
                             added to the Weld EE Embedded adapter in Arquillian 1.0.0.Alpha5 -->
                        <exclude>org/jboss/seam/solder/test/messages/TypedMessageBundleInjectionTest.java</exclude>
                        <exclude>org/jboss/seam/solder/test/logging/LoggerInjectionTest.java</exclude>
                        <exclude>org/jboss/seam/solder/test/logging/TypedMessageLoggerInjectionTest.java</exclude>
                     </excludes>
                  </configuration>
               </plugin>
            </plugins>
         </build>
      </profile>

      <profile>
         <id>incontainer</id>
         <activation>
            <activeByDefault>false</activeByDefault>
            <property>
               <name>incontainer</name>
            </property>
         </activation>
         <dependencies>
            <dependency>
               <groupId>org.jboss.arquillian.container</groupId>
               <artifactId>arquillian-jbossas-managed-6</artifactId>
               <version>${version.arquillian}</version>
            </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>
            </dependency>
            <dependency>
               <groupId>org.jboss.weld</groupId>
               <artifactId>weld-core</artifactId>
               <scope>test</scope>
            </dependency>
         </dependencies>
      </profile>
      <profile>
         <id>incontainer-remote</id>
         <activation>
            <activeByDefault>false</activeByDefault>
            <property>
               <name>incontainer-remote</name>
            </property>
         </activation>
         <dependencies>
            <dependency>
               <groupId>org.jboss.arquillian.container</groupId>
               <artifactId>arquillian-jbossas-remote-6</artifactId>
               <version>${version.arquillian}</version>
            </dependency>
            <dependency>
               <groupId>org.jboss.jbossas</groupId>
               <artifactId>jboss-as-client</artifactId>
               <type>pom</type>
            </dependency>
            <dependency>
               <groupId>org.jboss.weld</groupId>
               <artifactId>weld-core</artifactId>
               <scope>test</scope>
            </dependency>
         </dependencies>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-surefire-plugin</artifactId>
                  <configuration>
                     <parallel>none</parallel>
                  </configuration>
               </plugin>
            </plugins>
         </build>
      </profile>
      <profile>
         <id>incontainer-glassfish-remote</id>
         <activation>
            <activeByDefault>false</activeByDefault>
            <property>
               <name>incontainer-glassfish-remote</name>
            </property>
         </activation>
         <dependencies>
            <!-- ARQ-323 -->
            <dependency>
               <groupId>org.jboss.arquillian.container</groupId>
               <artifactId>arquillian-glassfish-remote-3.1</artifactId>
               <version>${version.arquillian}</version>
               <scope>test</scope>
            </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>
            <!-- FIXME move jersey version to parent -->
            <dependency>
               <groupId>com.sun.jersey</groupId>
               <artifactId>jersey-bundle</artifactId>
               <version>1.5</version>
               <scope>test</scope>
            </dependency>
            <dependency>
               <groupId>com.sun.jersey.contribs</groupId>
               <artifactId>jersey-multipart</artifactId>
               <version>1.5</version>
               <scope>test</scope>
            </dependency>
         </dependencies>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-surefire-plugin</artifactId>
                  <configuration>
                     <parallel>none</parallel>
                  </configuration>
               </plugin>
            </plugins>
         </build>
      </profile>
      <profile>
         <id>code-coverage</id>
         <build>
            <plugins>
               <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-dependency-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>
