<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>
      <artifactId>weld-core-parent</artifactId>
      <groupId>org.jboss.weld</groupId>
      <version>1.0.1-Final</version>
      <relativePath>../parent/pom.xml</relativePath>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.jboss.weld</groupId>
   <artifactId>weld-core-test</artifactId>
   <name>Weld Core Tests</name>
   <description>Tests for Weld, not including the CDI and AtInject TCKs</description>

   <licenses>
      <license>
         <name>Apache License, Version 2.0</name>
         <distribution>repo</distribution>
         <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
      </license>
   </licenses>
   <url>http://www.seamframework.org/Weld</url>


   <dependencies>

      <dependency>
         <groupId>org.testng</groupId>
         <artifactId>testng</artifactId>
         <classifier>jdk15</classifier>
         <exclusions>
            <exclusion>
               <artifactId>junit</artifactId>
               <groupId>junit</groupId>
            </exclusion>
         </exclusions>
      </dependency>

      <dependency>
         <groupId>org.jboss.test-harness</groupId>
         <artifactId>jboss-test-harness</artifactId>
      </dependency>

      <dependency>
         <groupId>org.jboss.test-harness</groupId>
         <artifactId>jboss-test-harness-jboss-as-60</artifactId>
         <exclusions>
            <exclusion>
               <groupId>org.jboss.slf4j</groupId>
               <artifactId>slf4j-jboss-logging</artifactId>
            </exclusion>
         </exclusions>
         <scope>test</scope>
      </dependency>

      <dependency>
         <groupId>javax.el</groupId>
         <artifactId>el-api</artifactId>
      </dependency>

      <dependency>
         <groupId>org.glassfish.web</groupId>
         <artifactId>el-impl</artifactId>
      </dependency>

      <dependency>
         <groupId>javax.servlet</groupId>
         <artifactId>servlet-api</artifactId>
      </dependency>

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

      <dependency>
         <groupId>org.jboss.weld</groupId>
         <artifactId>weld-spi</artifactId>
      </dependency>

      <dependency>
         <groupId>org.jboss.interceptor</groupId>
         <artifactId>jboss-interceptor-api</artifactId>
      </dependency>

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

      <dependency>
         <groupId>org.jboss.ejb3</groupId>
         <artifactId>jboss-ejb3-api</artifactId>
      </dependency>

      <dependency>
         <groupId>org.slf4j</groupId>
         <artifactId>slf4j-simple</artifactId>
         <scope>test</scope>
      </dependency>

      <dependency>
         <groupId>javax.transaction</groupId>
         <artifactId>jta</artifactId>
      </dependency>

      <dependency>
         <groupId>javax.persistence</groupId>
         <artifactId>persistence-api</artifactId>
      </dependency>

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

      <dependency>
         <groupId>javax.faces</groupId>
         <artifactId>jsf-api</artifactId>
         <!-- override for testing compatibility w/ JSF 2.0 -->
         <version>2.0.2-FCS</version>
      </dependency>

      <dependency>
         <groupId>net.sourceforge.htmlunit</groupId>
         <artifactId>htmlunit</artifactId>
      </dependency>

   </dependencies>

   <build>
      <defaultGoal>test</defaultGoal>
      <plugins>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
               <suiteXmlFiles>
                  <suiteXmlFile>unit-tests.xml</suiteXmlFile>
               </suiteXmlFiles>
               <argLine>-Xmx128m</argLine>
            </configuration>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-report-plugin</artifactId>
            <executions>
               <execution>
                  <id>generate-test-report</id>
                  <phase>test</phase>
                  <goals>
                     <goal>report-only</goal>
                  </goals>
               </execution>
            </executions>
            <configuration>
               <outputDirectory>${project.build.directory}/surefire-reports</outputDirectory>
               <outputName>test-report</outputName>
            </configuration>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <executions>
               <execution>
                  <id>copy</id>
                  <phase>process-resources</phase>
                  <goals>
                     <goal>copy</goal>
                  </goals>
                  <configuration>
                     <stripVersion>true</stripVersion>
                     <artifactItems>
                        <artifactItem>
                           <groupId>org.jboss.test-harness</groupId>
                           <artifactId>jboss-test-harness</artifactId>
                           <overWrite>true</overWrite>
                           <outputDirectory>${project.build.directory}/classes/lib</outputDirectory>
                        </artifactItem>
                        <artifactItem>
                           <groupId>org.glassfish.web</groupId>
                           <artifactId>el-impl</artifactId>
                           <overWrite>true</overWrite>
                           <outputDirectory>${project.build.directory}/dependency/lib</outputDirectory>
                        </artifactItem>
                     </artifactItems>
                  </configuration>
               </execution>
            </executions>
         </plugin>
      </plugins>
   </build>

   <profiles>
      <profile>
         <id>incontainer</id>
         <activation>
            <property>
               <name>incontainer</name>
            </property>
         </activation>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-surefire-plugin</artifactId>
                  <configuration>
                     <suiteXmlFiles>
                        <suiteXmlFile>unit-tests.xml</suiteXmlFile>
                     </suiteXmlFiles>
                     <systemProperties>
                        <property>
                           <name>org.jboss.testharness.standalone</name>
                           <value>false</value>
                        </property>
                        <property>
                           <name>org.jboss.testharness.container.extraConfigurationDir</name>
                           <value>../jboss-as</value>
                        </property>
                        <property>
                           <name>org.jboss.testharness.container.forceRestart</name>
                           <value>true</value>
                        </property>
                        <property>
                           <name>org.jboss.testharness.runIntegrationTests</name>
                           <value>true</value>
                        </property>
                        <property>
                           <name>org.jboss.testharness.libraryDirectory</name>
                           <value>target/dependency/lib</value>
                        </property>
                        <property>
                           <name>org.jboss.testharness.outputDirectory</name>
                           <value>target</value>
                        </property>
                     </systemProperties>
                  </configuration>
               </plugin>
            </plugins>
         </build>
      </profile>
      <profile>
         <id>write-artifacts-to-disk</id>
         <activation>
            <property>
               <name>dumpArtifacts</name>
            </property>
         </activation>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.codehaus.mojo</groupId>
                  <artifactId>exec-maven-plugin</artifactId>
                  <executions>
                     <execution>
                        <id>generate-test-artifacts</id>
                        <phase>generate-test-sources</phase>
                        <goals>
                           <goal>java</goal>
                        </goals>
                     </execution>
                  </executions>
                  <configuration>
                     <mainClass>org.jboss.testharness.api.TCK</mainClass>
                     <classpathScope>test</classpathScope>
                     <systemProperties>
                        <systemProperty>
                           <key>dumpArtifacts</key>
                           <value>true</value>
                        </systemProperty>
                        <systemProperty>
                           <key>org.jboss.testharness.outputDirectory</key>
                           <value>target/test-artifacts</value>
                        </systemProperty>
                        <systemProperty>
                           <key>org.jboss.testharness.libraryDirectory</key>
                           <value>target/dependency/lib</value>
                        </systemProperty>
                     </systemProperties>
                  </configuration>
               </plugin>
            </plugins>
         </build>
      </profile>
   </profiles>

   <scm> 
      <connection>scm:svn:http://anonsvn.jboss.org/repos/weld/core/tags/1.0.1-Final/tests</connection>
      <developerConnection>scm:svn:https://svn.jboss.org/repos/weld/core/tags/1.0.1-Final/tests</developerConnection>
      <url>http://fisheye.jboss.org/browse/weld/core/tags/1.0.1-Final/tests</url>
   </scm>

</project>
