<?xml version="1.0" encoding="UTF-8"?>
   <!--
  vi:ts=2:sw=2:expandtab:
-->
<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 -->
   <parent>
      <groupId>org.jboss.arquillian</groupId>
      <artifactId>arquillian-build</artifactId>
      <version>1.0.0.Alpha5</version>
      <relativePath>../../build/pom.xml</relativePath>
   </parent>

   <!-- Model Version -->
   <modelVersion>4.0.0</modelVersion>

   <!-- Artifact Configuration -->
   <groupId>org.jboss.arquillian.extension</groupId>
   <artifactId>arquillian-drone</artifactId>
   <name>Arquillian Drone Extension</name>
   <description>Extension for functional testing based on web view layer (Ajocado, Selenium, WebDriver)</description>

   <developers>
      <developer>
         <name>Karel Piwko</name>
         <email>kpiwko@redhat.com</email>
      </developer>
   </developers>

   <properties>
      <!-- Versioning -->
      <version.ajocado>1.0.0.Alpha1</version.ajocado>
      <version.jboss_60>6.0.0.Final</version.jboss_60>
      <version.selenium>2.0b2</version.selenium>
      <version.slf4j>1.5.10</version.slf4j>

      <!-- example dependencies -->
      <version.jpa>1.0</version.jpa>
      <version.cdi>1.0-SP1</version.cdi>
      <version.jsf>2.0.2-FCS</version.jsf>
      <version.el>2.2</version.el>

   </properties>

   <!-- Dependencies -->
   <dependencies>
      <dependency>
         <groupId>org.jboss.arquillian</groupId>
         <artifactId>arquillian-spi</artifactId>
         <version>${project.version}</version>
      </dependency>
      <dependency>
         <groupId>org.jboss.arquillian</groupId>
         <artifactId>arquillian-impl-base</artifactId>
         <version>${project.version}</version>
      </dependency>
      <dependency>
         <groupId>org.jboss.arquillian.ajocado</groupId>
         <artifactId>arquillian-ajocado-api</artifactId>
         <version>${version.ajocado}</version>
      </dependency>
      <dependency>
         <groupId>org.jboss.arquillian.ajocado</groupId>
         <artifactId>arquillian-ajocado-impl</artifactId>
         <version>${version.ajocado}</version>
         <scope>provided</scope>
      </dependency>

      <!-- add following selenium dependencies (including any slf4j impl) to your pom file into test scope -->
      <dependency>
         <groupId>org.seleniumhq.selenium</groupId>
         <artifactId>selenium-remote-control</artifactId>
         <version>${version.selenium}</version>
         <scope>provided</scope>        
      </dependency>
      <dependency>
         <groupId>org.seleniumhq.selenium</groupId>
         <artifactId>selenium-server</artifactId>
         <version>${version.selenium}</version>
         <scope>provided</scope>
      </dependency>
      
      <!-- required to run Selenium Server -->
      <dependency>
         <groupId>org.slf4j</groupId>
         <artifactId>slf4j-simple</artifactId>
         <version>${version.slf4j}</version>
         <scope>test</scope>
      </dependency>
      

      <!-- test dependencies -->

      <dependency>
         <groupId>org.jboss.arquillian</groupId>
         <artifactId>arquillian-junit</artifactId>
         <version>${project.version}</version>
         <scope>test</scope>
      </dependency>
      
      <dependency>
         <groupId>junit</groupId>
         <artifactId>junit</artifactId>         
         <scope>test</scope>
      </dependency>

      <dependency>
         <groupId>org.jboss.arquillian</groupId>
         <artifactId>arquillian-impl-base</artifactId>
         <version>${project.version}</version>
         <classifier>tests</classifier>
         <scope>test</scope>
      </dependency>
      
      <!-- we are using a Weld based example for testing -->
      <dependency>
         <groupId>javax.enterprise</groupId>
         <artifactId>cdi-api</artifactId>
         <version>${version.cdi}</version>
         <scope>test</scope>
      </dependency>

      <dependency>
         <groupId>javax.faces</groupId>
         <artifactId>jsf-api</artifactId>
         <version>${version.jsf}</version>
         <scope>test</scope>
      </dependency>

      <dependency>
         <groupId>javax.persistence</groupId>
         <artifactId>persistence-api</artifactId>
         <version>${version.jpa}</version>
         <scope>test</scope>
      </dependency>
      

      <!-- external dependencies -->      
      <dependency>
         <groupId>org.mockito</groupId>
         <artifactId>mockito-all</artifactId>
         <scope>test</scope>
      </dependency>

   </dependencies>

   <build>
      <plugins>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <executions>
               <execution>
                  <id>default-test</id>
                  <goals>
                     <goal>test</goal>
                  </goals>
                  <configuration>
                     <skipTests>true</skipTests>
                  </configuration>
               </execution>
            </executions>
         </plugin>
      </plugins>
   </build>

   <profiles>
   
      <!-- default test which are not container dependent -->
      <profile>
         <id>default</id>
         <activation>
            <activeByDefault>true</activeByDefault>
         </activation>

         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-surefire-plugin</artifactId>
                  <executions>
                     <execution>
                        <id>default-test</id>
                        <goals>
                           <goal>test</goal>
                        </goals>
                        <configuration>
                           <skipTests>false</skipTests>
                           <includes>
                              <include>org/jboss/arquillian/drone/factory/*TestCase.class</include>
                              <include>org/jboss/arquillian/drone/impl/*TestCase.class</include>
                           </includes>
                        </configuration>
                     </execution>
                  </executions>
               </plugin>
            </plugins>
         </build>
      </profile>

      <!--  Uses Selenium 2.0 default, that is WebDriver HtmlUnit driver -->
      <profile>
         <id>htmlunitdriver</id>

         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-surefire-plugin</artifactId>
                  <executions>
                     <execution>
                        <id>htmlunitdriver-test</id>
                        <goals>
                           <goal>test</goal>
                        </goals>
                        <configuration>
                           <includes>
                              <include>org/jboss/arquillian/drone/example/WebDriverTestCase.class</include>
                           </includes>
                        </configuration>
                     </execution>
                  </executions>
               </plugin>
            </plugins>
         </build>
      </profile>
      
      <!-- uses Selenium 2.0 FirefoxDriver -->
      <profile>
         <id>firefoxdriver</id>

         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-surefire-plugin</artifactId>
                  <executions>
                     <execution>
                        <id>firefoxdriver-test</id>
                        <goals>
                           <goal>test</goal>
                        </goals>
                        <configuration>
                           <systemPropertyVariables>
                              <arquillian.webdriver.implementation.class>org.openqa.selenium.firefox.FirefoxDriver</arquillian.webdriver.implementation.class>
                           </systemPropertyVariables>
                           <includes>
                              <include>org/jboss/arquillian/drone/example/WebDriverTestCase.class</include>
                           </includes>
                        </configuration>
                     </execution>
                  </executions>
               </plugin>
            </plugins>
         </build>
      </profile>
      
      <!--
            uses legacy Selenium 2.0 DefaultSelenium driver with
            starting/stopping Selenium Server automatically
         -->
      <profile>
         <id>defaultselenium</id>

         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-surefire-plugin</artifactId>
                  <version>2.7.2</version>
                  <executions>
                     <execution>
                        <id>defaultselenium-test</id>
                        <goals>
                           <goal>test</goal>
                        </goals>
                        <configuration>
                           <systemPropertyVariables>
                              <arquillian.selenium.server.enable>true</arquillian.selenium.server.enable>
                           </systemPropertyVariables>
                           <includes>
                              <include>org/jboss/arquillian/drone/example/DefaultSeleniumTestCase.class</include>
                           </includes>
                        </configuration>
                     </execution>
                  </executions>
               </plugin>
            </plugins>
         </build>
      </profile>
      
      <!-- uses Ajocado -->
      <profile>

         <id>ajocado</id>

         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-surefire-plugin</artifactId>
                  <executions>
                     <execution>
                        <id>ajocado-test</id>
                        <goals>
                           <goal>test</goal>
                        </goals>
                        <configuration>
                           <systemPropertyVariables>
                              <arquillian.selenium.server.enable>true</arquillian.selenium.server.enable>
                           </systemPropertyVariables>
                           <includes>
                              <include>org/jboss/arquillian/drone/example/AjocadoTestCase.class</include>
                           </includes>
                        </configuration>
                     </execution>
                  </executions>
               </plugin>
            </plugins>
         </build>
      </profile>
      
      <!-- CONTAINER PROFILES -->

      <!--  Deploys example to remote JBoss AS 6 instance -->
      <profile>

         <id>jbossas-remote-6</id>
         <dependencies>
            <dependency>
               <groupId>org.jboss.arquillian.container</groupId>
               <artifactId>arquillian-jbossas-remote-6</artifactId>
               <version>${project.version}</version>
            </dependency>
            <dependency>
               <groupId>org.jboss.jbossas</groupId>
               <artifactId>jboss-as-client</artifactId>
               <version>${version.jboss_60}</version>
               <type>pom</type>
            </dependency>
         </dependencies>

         <build>
            <testResources>
               <testResource>
                  <directory>src/test/jboss-resources</directory>
               </testResource>
            </testResources>            
         </build>

      </profile>

   </profiles>

</project>

