<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">
   <parent>
      <groupId>org.gatein.wci</groupId>
      <artifactId>wci-test-server-parent</artifactId>
      <version>2.2.0-Beta02</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>wci-test-tomcat7</artifactId>
   <packaging>jar</packaging>
   <name>GateIn - WCI Tomcat 7 test component</name>

   <dependencies>
      <dependency>
        <groupId>org.gatein.wci</groupId>
        <artifactId>wci-wci</artifactId>
		<scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.gatein.wci</groupId>
        <artifactId>wci-tomcat7</artifactId>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.gatein.wci</groupId>
        <artifactId>wci-exo</artifactId>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.gatein.wci</groupId>
        <artifactId>wci-test-core</artifactId>
        <scope>test</scope>
      </dependency>      
      <dependency>
        <groupId>org.gatein.wci</groupId>
        <artifactId>wci-test-native-portlet</artifactId>
        <scope>test</scope>
        <type>war</type>
      </dependency>
      <dependency>
        <groupId>org.gatein.wci</groupId>
        <artifactId>wci-test-native-skipped-portlet</artifactId>
        <scope>test</scope>
        <type>war</type>
      </dependency>      
      <dependency>
        <groupId>org.gatein.wci</groupId>
        <artifactId>wci-test-native-skipped-with-gateinservlet-portlet</artifactId>
        <scope>test</scope>
        <type>war</type>
      </dependency>
      <dependency>
        <groupId>org.gatein.wci</groupId>
        <artifactId>wci-test-gatein-portlet</artifactId>
        <scope>test</scope>
        <type>war</type>
      </dependency> 
      <dependency>
        <groupId>org.gatein.wci</groupId>
        <artifactId>wci-test-exo-portlet</artifactId>
        <scope>test</scope>
        <type>war</type>
      </dependency>

      <dependency>
         <artifactId>junit</artifactId>
         <groupId>junit</groupId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.gatein.common</groupId>
         <artifactId>common-common</artifactId>
          <exclusions>
           <exclusion>
             <groupId>org.codehaus.cargo</groupId>
             <artifactId>cargo-core-uberjar</artifactId>
            </exclusion>
         </exclusions>
      </dependency>
      <dependency>
         <groupId>org.gatein.common</groupId>
         <artifactId>common-mc</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.gatein.common</groupId>
         <artifactId>common-logging</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.slf4j</groupId>
         <artifactId>slf4j-api</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.slf4j</groupId>
         <artifactId>slf4j-simple</artifactId>
         <scope>test</scope>
      </dependency>
      <!-- JBOSS UNIT DEPENDENCIES -->
      <dependency>
         <groupId>org.jboss.unit</groupId>
         <artifactId>jboss-unit</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.jboss.unit</groupId>
         <artifactId>jboss-unit-remote</artifactId>
         <scope>test</scope>
         <exclusions>
           <exclusion>
             <groupId>org.codehaus.cargo</groupId>
             <artifactId>cargo-core-uberjar</artifactId>
           </exclusion>
           <exclusion>
             <groupId>org.codehaus.cargo</groupId>
             <artifactId>cargo-core-uberjar</artifactId>
           </exclusion>
           <exclusion>
               <groupId>apache-httpclient</groupId>
               <artifactId>commons-httpclient</artifactId>
            </exclusion>
            <exclusion>
               <groupId>org.jboss.microcontainer</groupId>
               <artifactId>jboss-container</artifactId>
            </exclusion>
         </exclusions>
      </dependency>
      <dependency>
         <groupId>org.jboss.unit</groupId>
         <artifactId>jboss-unit-mc</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.jboss.unit</groupId>
         <artifactId>jboss-unit-tooling-ant</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.jboss.unit</groupId>
         <artifactId>portal-test</artifactId>
         <scope>test</scope>
         <exclusions>
           <exclusion>
             <groupId>org.codehaus.cargo</groupId>
             <artifactId>cargo-core-uberjar</artifactId>
           </exclusion>
           <exclusion>
               <groupId>hibernate</groupId>
               <artifactId>hibernate3</artifactId>
            </exclusion>
            <exclusion>
               <groupId>apache-log4j</groupId>
               <artifactId>log4j</artifactId>
            </exclusion>
            <exclusion>
               <groupId>apache-slide</groupId>
               <artifactId>webdavlib</artifactId>
            </exclusion>
            <exclusion>
               <groupId>apache-httpclient</groupId>
               <artifactId>commons-httpclient</artifactId>
            </exclusion>
         </exclusions>
      </dependency>
      <dependency>
         <groupId>org.jboss.unit</groupId>
         <artifactId>portal-test-generic</artifactId>
         <scope>test</scope>
         <exclusions>
           <exclusion>
             <groupId>org.codehaus.cargo</groupId>
             <artifactId>cargo-core-uberjar</artifactId>
           </exclusion>
           <exclusion>
               <groupId>hibernate</groupId>
               <artifactId>hibernate3</artifactId>
           </exclusion>
           <exclusion>
               <groupId>apache-log4j</groupId>
               <artifactId>log4j</artifactId>
            </exclusion>
         </exclusions>
      </dependency>
      <!-- JBOSS MICROCONAINER DEPENDENCIES -->
      <dependency>
         <groupId>org.jboss.microcontainer</groupId>
         <artifactId>jboss-kernel</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.jboss.microcontainer</groupId>
         <artifactId>jboss-dependency</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.jboss</groupId>
         <artifactId>jboss-reflect</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
          <groupId>javax.xml.bind</groupId>
          <artifactId>jaxb-api</artifactId>
          <scope>test</scope>
      </dependency>
      <!-- OTHER DEPENDENCIES -->
      <dependency>
         <groupId>log4j</groupId>
         <artifactId>log4j</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>concurrent</groupId>
         <artifactId>concurrent</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>apache-xerces</groupId>
         <artifactId>xercesImpl</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>apache-xerces</groupId>
         <artifactId>xml-apis</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>jboss</groupId>
         <artifactId>jboss-serialization</artifactId>
         <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>commons-discovery</groupId>
        <artifactId>commons-discovery</artifactId>
      </dependency>

      <dependency>
        <groupId>org.jboss.remoting</groupId>
        <artifactId>jboss-remoting</artifactId>
      </dependency>

      <dependency>
        <groupId>org.codehaus.cargo</groupId>
        <artifactId>cargo-core-uberjar</artifactId>
        <version>${version.cargo}</version>
        <scope>test</scope>
      </dependency>

   </dependencies>


   <build>
     <plugins>
       <plugin>
         <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-common-build.xml</id>
            <phase>process-resources</phase>
            <goals>
              <goal>copy</goal>
            </goals>
           </execution>
         </executions>
       </plugin>
       <plugin>
         <artifactId>maven-assembly-plugin</artifactId>
         <configuration>
           <finalName>test</finalName>
           <appendAssemblyId>true</appendAssemblyId>
           <!-- we don't want to add these archives into the repo -->
           <attach>false</attach>
           <outputDirectory>${project.build.directory}/test-archives</outputDirectory>
           <descriptors>
             <descriptor>src/assembly/spi-native-server.xml</descriptor>
             <descriptor>src/assembly/spi-generic-server.xml</descriptor>
             <descriptor>src/assembly/spi-exo-server.xml</descriptor>
             <descriptor>src/assembly/endpoint-default-servlet-mapping.xml</descriptor>
             <descriptor>src/assembly/endpoint-path-mapping.xml</descriptor>
             <descriptor>src/assembly/endpoint-root-path-mapping.xml</descriptor>
           </descriptors>
         </configuration>
          <executions>
            <execution>
              <id>assemble</id>
              <phase>test</phase>
              <goals>
                <goal>single</goal>
              </goals>
            </execution>
          </executions>
       </plugin>
       <plugin>
         <artifactId>maven-antrun-plugin</artifactId>
         <dependencies>

                <dependency>
                  <groupId>org.jboss.unit</groupId>
                  <artifactId>jboss-unit-tooling-ant</artifactId>
                  <version>${version.jboss.unit}</version>
               </dependency>
               <dependency>
                  <groupId>org.jboss.unit</groupId>
                  <artifactId>jboss-unit</artifactId>
                  <version>${version.jboss.unit}</version>
               </dependency>

               <dependency>
                  <groupId>org.codehaus.cargo</groupId>
                  <artifactId>cargo-ant</artifactId>
                  <version>${version.cargo}</version>
                  <exclusions>
                     <exclusion>
                        <groupId>ant</groupId>
                        <artifactId>ant</artifactId>
                     </exclusion>
                  </exclusions>
               </dependency>
               <dependency>
                 <groupId>org.jdom</groupId>
                 <artifactId>jdom</artifactId>
                 <version>1.1</version>
               </dependency>
               <dependency>
                 <groupId>dom4j</groupId>
                 <artifactId>dom4j</artifactId>
                 <version>1.6.1</version>
               </dependency>
               <dependency>
                 <groupId>jaxen</groupId>
                 <artifactId>jaxen</artifactId>
                 <version>1.1.1</version>
               </dependency>
         </dependencies>
         <version>1.3</version>
           <executions>
             <execution>
             <id>integration-testing</id>
             <phase>integration-test</phase>
             <configuration>
               <tasks>
                
                 <!-- properties to pass to the build.xml --> 
                 <property name="project.build.directory" value="${project.build.directory}" />
                 <property name="plugin_classpath" refid="maven.plugin.classpath" />
                 <property name="test_classpath" refid="maven.test.classpath" />

                 <!-- hack here allows for profiles to effect tasks in the build.xml -->
                 <!-- this should be removed when the antrun plugin properly handles properties -->
                 <condition property="test.generic.enable">
                   <istrue value="${test.generic}" />
                 </condition>
                 <condition property="test.native.enable">
                   <istrue value="${test.native}" />
                 </condition>
                 <condition property="test.exo.enable">
                   <istrue value="${test.exo}" />
                 </condition>
                 <condition property="test.endpoint.enable">
                   <istrue value="${test.endpoint}" />
                 </condition>
                 <condition property="cargo.debug" value="${test.cargo.debug}">
                   <isset property="test.cargo.debug" />
                 </condition>
                 <condition property="cargo.debug" value="">
                   <not>
                     <isset property="test.cargo.debug" />
                   </not>
                 </condition>
                 <!-- end profiles hack -->

                 <!-- server dependencies -->
                 <property name="dependency.jboss-logging-spi.jar" value="${maven.dependency.jboss.jboss-common-logging-spi.jar.path}" />
                 <property name="dependency.jboss-logging-jdk.jar" value="${maven.dependency.jboss.jboss-common-logging-jdk.jar.path}" />
                 <property name="dependency.jboss-logging-log4j.jar" value="${maven.dependency.jboss.jboss-common-logging-log4j.jar.path}" />
                 <property name="dependency.gatein-common-common.jar" value="${maven.dependency.org.gatein.common.common-common.jar.path}" />
                 <property name="dependency.gatein-common-logging.jar" value="${maven.dependency.org.gatein.common.common-logging.jar.path}" />
                 <property name="dependency.slf4j-api.jar" value="${maven.dependency.org.slf4j.slf4j-api.jar.path}" />
                 <property name="dependency.slf4j-simple.jar" value="${maven.dependency.org.slf4j.slf4j-simple.jar.path}" />
                 <property name="dependency.activation.jar" value="${maven.dependency.javax.activation.activation.jar.path}" />
                 <property name="dependency.junit.jar" value="${maven.dependency.junit.junit.jar.path}" />
                 <property name="dependency.gatein-wci-core.jar" value="${maven.dependency.org.gatein.wci.wci-wci.jar.path}" />
                 <property name="dependency.gatein-wci-tomcat.jar" value="${maven.dependency.org.gatein.wci.wci-tomcat7.jar.path}" />
                 <property name="dependency.gatein-wci-exo.jar" value="${maven.dependency.org.gatein.wci.wci-exo.jar.path}" />
                 <property name="dependency.jboss-serialization.jar" value="${maven.dependency.jboss.jboss-serialization.jar.path}" />
                 <property name="dependency.tomcat.jar" value="${maven.dependency.org.apache.tomcat.tomcat-catalina.jar.path}" />

                 <!-- locations of archives to use -->
                 <property name="test.archives.directory" value="${project.build.directory}/test-archives" />
                 <property name="test.generic.server.war" value="${test.archives.directory}/test-spi-generic-server.war" />
                 <property name="test.native.server.war" value="${test.archives.directory}/test-spi-native-server.war" />
                 <property name="test.exo.server.war" value="${test.archives.directory}/test-spi-exo-server.war" />

                 <property name="test.endpoint.default.server.mapping.server.war" value="${test.archives.directory}/test-endpoint-default-servlet-mapping.war" />
                 <property name="test.endpoint.root.mapping.server.war" value="${test.archives.directory}/test-endpoint-root-path-mapping.war" />
                 <property name="test.endpoint.path.mapping.server.war" value="${test.archives.directory}/test-endpoint-path-mapping.war" />

                 <property name="test.generic.portlet.war" value="${maven.dependency.org.gatein.wci.wci-test-gatein-portlet.war.path}" />
                 <property name="test.native.portlet.war" value="${maven.dependency.org.gatein.wci.wci-test-native-portlet.war.path}" />
                 <property name="test.native-skip.portlet.war" value="${maven.dependency.org.gatein.wci.wci-test-native-skipped-portlet.war.path}" />
                 <property name="test.native-skip-with-gateinservlet.portlet.war" value="${maven.dependency.org.gatein.wci.wci-test-native-skipped-with-gateinservlet-portlet.war.path}" />
                 <property name="test.exo.portlet.war" value="${maven.dependency.org.gatein.wci.wci-test-exo-portlet.war.path}" />                  

                 <!-- location of common.xml shared between the different server's build.xml -->
                 <property name="common.xml.file" value="${test.common.xml}" />
                 <!-- -->
 
                 <ant antfile="${basedir}/src/integration-tests/build.xml" inheritRefs="true">
                   <target name="tests" />
                 </ant>
               </tasks>
             </configuration>
             <goals>
               <goal>run</goal>
             </goals>
             </execution>
           </executions>
       </plugin>
     </plugins>
   </build>
   <properties>
   </properties>

   <profiles>
     <profile>
       <id>all</id>
       <activation>
         <activeByDefault>true</activeByDefault>
       </activation>
       <properties>
         <test.generic>true</test.generic>
         <test.native>true</test.native>
         <test.exo>true</test.exo>
         <test.endpoint>true</test.endpoint>
       </properties>
     </profile>
     <profile>
       <id>generic</id>
       <properties>
         <test.generic>true</test.generic>
       </properties>
     </profile>
     <profile>
       <id>native</id>
       <properties>
         <test.native>true</test.native>
       </properties>
     </profile>
     <profile>
       <id>exo</id>
       <properties>
         <test.exo>true</test.exo>
       </properties>
     </profile>
     <profile>
       <id>endpoint</id>
       <properties>
         <test.endpoint>true</test.endpoint>
       </properties>
     </profile>
     <profile>
       <id>cargo.debug</id>
       <properties>
         <test.cargo.debug>-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000</test.cargo.debug>
       </properties>
     </profile>
   </profiles>
</project>
