<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-jboss7</artifactId>
   <packaging>jar</packaging>
   <name>GateIn - WCI JBoss 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-jboss7</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>
         <exclusions>
            <exclusion>
               <groupId>org.jboss.logging</groupId>
               <artifactId>jboss-logging-spi</artifactId>
            </exclusion>
         </exclusions>
      </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>
         <version>${version.jboss.unit}</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.jboss.unit</groupId>
         <artifactId>jboss-unit-remote</artifactId>
         <version>${version.jboss.unit}</version>
         <scope>test</scope>
         <exclusions>
            <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>
         <version>${version.jboss.unit}</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.jboss.unit</groupId>
         <artifactId>jboss-unit-tooling-ant</artifactId>
         <version>${version.jboss.unit}</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.jboss.unit</groupId>
         <artifactId>portal-test</artifactId>
         <version>${version.jboss.unit}</version>
         <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>
            <exclusion>
               <groupId>jboss</groupId>
               <artifactId>jboss-common-core</artifactId>
            </exclusion>
         </exclusions>
      </dependency>
      <dependency>
         <groupId>org.jboss.unit</groupId>
         <artifactId>portal-test-generic</artifactId>
         <version>${version.jboss.unit}</version>
         <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>jboss</groupId>
               <artifactId>jboss-common-core</artifactId>
            </exclusion>
         </exclusions>
      </dependency>
      <!-- JBOSS MICROCONAINER DEPENDENCIES -->
      <dependency>
         <groupId>org.jboss.microcontainer</groupId>
         <artifactId>jboss-kernel</artifactId>
         <scope>test</scope>
         <exclusions>
            <exclusion>
               <groupId>org.jboss.logging</groupId>
               <artifactId>jboss-logging-spi</artifactId>
            </exclusion>
         </exclusions>
      </dependency>
      <dependency>
         <groupId>org.jboss.microcontainer</groupId>
         <artifactId>jboss-dependency</artifactId>
         <scope>test</scope>
         <exclusions>
            <exclusion>
               <groupId>org.jboss.logging</groupId>
               <artifactId>jboss-logging-spi</artifactId>
            </exclusion>
         </exclusions>
      </dependency>
      <dependency>
         <groupId>org.jboss</groupId>
         <artifactId>jboss-reflect</artifactId>
         <scope>test</scope>
         <exclusions>
            <exclusion>
               <groupId>org.jboss.logging</groupId>
               <artifactId>jboss-logging-spi</artifactId>
            </exclusion>
         </exclusions>
      </dependency>
      <dependency>
         <groupId>org.jboss</groupId>
         <artifactId>jboss-common-core</artifactId>
         <scope>test</scope>
         <exclusions>
            <exclusion>
               <groupId>jboss</groupId>
               <artifactId>jboss-common-logging-spi</artifactId>
            </exclusion>
            <exclusion>
               <groupId>org.jboss.logging</groupId>
               <artifactId>jboss-logging-spi</artifactId>
            </exclusion>
         </exclusions>
      </dependency>
      <dependency>
         <groupId>org.jboss.logging</groupId>
         <artifactId>jboss-logging</artifactId>
         <version>3.1.0.GA</version>
         <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>

      <dependency>
         <groupId>org.codehaus.cargo</groupId>
         <artifactId>cargo-core-tools-jboss-deployer-7</artifactId>
         <version>${version.cargo}</version>
         <scope>test</scope>
      </dependency>

      <!-- JBoss Deployer -->
      <dependency>
         <groupId>org.jboss.as</groupId>
         <artifactId>jboss-as-controller-client</artifactId>
         <version>7.1.1.Final</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/jboss-as-integration.xml</descriptor>
                  <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>
               <archive>
                  <manifestEntries>
                     <Dependencies>org.gatein.wci.integration-tests.shared</Dependencies>
                  </manifestEntries>
               </archive>
            </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>
                  <exclusions>
                     <exclusion>
                        <groupId>org.jboss.logging</groupId>
                        <artifactId>jboss-logging-spi</artifactId>
                     </exclusion>
                  </exclusions>
               </dependency>
               <dependency>
                  <groupId>org.jboss.unit</groupId>
                  <artifactId>jboss-unit</artifactId>
                  <version>${version.jboss.unit}</version>
                  <exclusions>
                     <exclusion>
                        <groupId>org.jboss.logging</groupId>
                        <artifactId>jboss-logging-spi</artifactId>
                     </exclusion>
                  </exclusions>
               </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.4</version>
            <inherited>false</inherited>
            <executions>
               <execution>
                  <id>integration-testing</id>
                  <phase>integration-test</phase>
                  <configuration>
                     <tasks>

                        <dependencyfilesets />
                        <path id="jbossunit.classpath">
                           <fileset refid="junit:junit:jar" />
                           <fileset refid="org.jboss.unit:jboss-unit:jar" />
                           <fileset refid="org.jboss.unit:jboss-unit-remote:jar" />
                           <fileset refid="org.jboss.unit:jboss-unit-tooling-ant:jar" />
                           <fileset refid="org.jboss.unit:portal-test:jar" />
                           <fileset refid="org.jboss.unit:portal-test-generic:jar" />

                        </path>

                        <!-- 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" />
                        <!--property name="test_classpath" refid="jbossunit.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.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.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.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-jboss7.jar" value="${maven.dependency.org.gatein.wci.wci-jboss7.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.cargo-jboss-deployer.jar" value="${maven.dependency.org.codehaus.cargo.cargo-core-tools-jboss-deployer-5.1-and-onwards.jar.path}" />
                        <property name="dependency.jboss-profile-service.jar" value="${maven.dependency.org.jboss.integration.jboss-profileservice-spi.jar.path}" />
                        <property name="dependency.cargo-core-container-jboss.jar" value="${maven.dependency.org.codehaus.cargo.cargo-core-container-jboss.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}" />

                        <property name="dependency.mc.jboss-kernel.jar" value="${maven.dependency.org.jboss.microcontainer.jboss-kernel.jar.path}" />
                        <property name="dependency.mc.jboss-dependency.jar" value="${maven.dependency.org.jboss.microcontainer.jboss-dependency.jar.path}" />
                        <property name="dependency.jboss-reflect.jar" value="${maven.dependency.org.jboss.jboss-reflect.jar.path}" />
                        <property name="dependency.jboss-common-core.jar" value="${maven.dependency.org.jboss.jboss-common-core.jar.path}" />
                        <property name="dependency.jboss.logging.spi.jar" value="${maven.dependency.org.jboss.logging.jboss-logging-spi.jar.path}" />
                        <property name="dependency.jboss.logging.jdk.jar" value="${maven.dependency.org.jboss.logging.jboss-logging-jdk.jar.path}" />
                        <property name="dependency.jboss.logging.log4j.jar" value="${maven.dependency.org.jboss.logging.jboss-logging-log4j.jar.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>
      <!-- latest JBoss Unit, and cargo for jboss-as7 support -->
      <version.jboss.unit>1.2.4</version.jboss.unit>
      <version.cargo>1.2.1</version.cargo>

      <version.org.slf4j>1.5.8</version.org.slf4j>
      <version.jboss.mc.kernel>2.0.9.GA</version.jboss.mc.kernel>
      <version.jboss.reflect>2.0.2.GA</version.jboss.reflect>
      <version.jboss.common>2.2.9.GA</version.jboss.common>
      <version.jboss.logging>2.0.5.GA</version.jboss.logging>
   </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>
