<!--
  ~ JBoss, Home of Professional Open Source.
  ~ Copyright 2011, Red Hat Middleware LLC, and individual contributors
  ~ as indicated by the @author tags. See the copyright.txt file in the
  ~ distribution for a full listing of individual contributors.
  ~
  ~ This is free software; you can redistribute it and/or modify it
  ~ under the terms of the GNU Lesser General Public License as
  ~ published by the Free Software Foundation; either version 2.1 of
  ~ the License, or (at your option) any later version.
  ~
  ~ This software is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  ~ Lesser General Public License for more details.
  ~
  ~ You should have received a copy of the GNU Lesser General Public
  ~ License along with this software; if not, write to the Free
  ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  -->

<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.gatein.portal</groupId>
      <artifactId>exo.portal.testsuite</artifactId>
      <version>3.6.0.Final</version>
  </parent>

  <artifactId>portal-testsuite-htmlunit-tests</artifactId>
  <packaging>jar</packaging>
  <name>HTMLUnit Tests for GateIn</name>
  <description>HTMLUnit Tests for GateIn</description>

  <properties>
    <testng.suite.file>testng.xml</testng.suite.file>
    <test.host>localhost</test.host>
    <test.port>8080</test.port>
    <test.portalContainer>portal</test.portalContainer>
    <test.waitTimeout>20</test.waitTimeout>
    <test.shortPause>3</test.shortPause>
  </properties>

  <!-- no tests by default -->
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.5</source>
          <target>1.5</target>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>htmlunit</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <executions>
              <execution>
                <phase>integration-test</phase>
                <goals>
                  <goal>test</goal>
                </goals>
                <configuration>
                  <skip>false</skip>
                  <includes>
                    <include>**/Test*.java</include>
                  </includes>
                  <!--suiteXmlFiles>
                     <suiteXmlFile>src/test/resources/${testng.suite.file}</suiteXmlFile>
                  </suiteXmlFiles-->
                  <systemProperties>
                    <property>
                      <name>test.host</name>
                      <value>${test.host}</value>
                    </property>
                    <property>
                      <name>test.port</name>
                      <value>${test.port}</value>
                    </property>
                    <property>
                      <name>test.portalContainer</name>
                      <value>${test.portalContainer}</value>
                    </property>
                    <property>
                      <name>test.waitTimeout</name>
                      <value>${test.waitTimeout}</value>
                    </property>
                    <property>
                      <name>test.shortPause</name>
                      <value>${test.shortPause}</value>
                    </property>
                  </systemProperties>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  <dependencies>
    <dependency>
      <groupId>org.testng</groupId>
      <artifactId>testng</artifactId>
      <version>5.12.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>net.sourceforge.htmlunit</groupId>
      <artifactId>htmlunit</artifactId>
      <version>2.8</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>
