<?xml version="1.0" encoding="UTF-8"?>
<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.jboss.weld</groupId>
      <artifactId>weld-parent</artifactId>
      <version>9</version>
   </parent>
   <groupId>org.jboss.weld.examples</groupId>
   <artifactId>weld-examples-parent</artifactId>
   <packaging>pom</packaging>
   <version>1.0.1-Final</version>
   <name>Weld Examples</name>

   <description>
      Examples for Weld, the reference implementation of JSR 299: Contexts and Dependency Injection for Java EE
   </description>

   <url>http://www.seamframework.org/Weld</url>

   <developers>
      <developer>
         <name>Pete Muir</name>
         <roles>
            <role>Project Lead</role>
         </roles>
         <email>pete.muir@jboss.org</email>
         <organization>JBoss, a division of Red Hat</organization>
         <url>http://in.relation.to/Bloggers/Pete</url>
      </developer>

      <developer>
         <name>Shane Bryzak</name>
         <organization>JBoss, a division of Red Hat</organization>
      </developer>

      <developer>
         <name>David Allen</name>
      </developer>

      <developer>
         <name>Nicklas Karlsson</name>
      </developer>

      <developer>
         <name>Clint Popetz</name>
      </developer>

      <developer>
         <name>Pete Royle</name>
      </developer>

   </developers>
   <ciManagement>
      <system>Hudson</system>
      <url>http://hudson.jboss.org</url>
   </ciManagement>

   <issueManagement>
      <system>JIRA</system>
      <url>http://jira.jboss.org/browse/WELD</url>
   </issueManagement>

   <organization>
      <name>Seam Framework</name>
      <url>http://seamframework.org</url>
   </organization>

   <inceptionYear>2008</inceptionYear>

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

   <modules>
      <module>jsf/numberguess</module>
      <module>jsf/translator</module>
      <module>jsf/login</module>
      <module>jsf/permalink</module>
      <module>se/numberguess</module>
      <module>se/hello-world</module>
      <module>wicket/numberguess</module>
   </modules>

   <properties>
      <jsf.version>2.0.2-FCS</jsf.version>
      <weld.api.version>1.0-SP1</weld.api.version>
      <weld.wicket.version>1.0.1-Final</weld.wicket.version>
      <weld.se.version>1.0.1-Final</weld.se.version>
      <weld.servlet.version>1.0.1-Final</weld.servlet.version>
      <jetty.version>6.1.21</jetty.version>
      <uel.glassfish.version>2.1.2-b04</uel.glassfish.version>
      <!-- Testing deps -->
      <testng.version>5.10</testng.version>
      <selenium.java.client.version>1.0.1</selenium.java.client.version>
      <selenium.maven.plugin.version>1.0</selenium.maven.plugin.version>
      <cargo.maven2.plugin.version>1.0</cargo.maven2.plugin.version>
      <maven.antrun.plugin.version>1.3</maven.antrun.plugin.version>
      <failsafe.maven.plugin.version>2.4.3-alpha-1</failsafe.maven.plugin.version>
      <ant.junit.version>1.6.2</ant.junit.version>
      <ftest.version.discriminator />
      <selenium.browser>*firefoxproxy</selenium.browser>
      <selenium.browser.url>http://localhost:8080</selenium.browser.url>
      <selenium.server.port>14444</selenium.server.port>
      <selenium.server.host>localhost</selenium.server.host>
      <selenium.speed>0</selenium.speed>
      <selenium.timeout>30000</selenium.timeout>
      <selenium.debug>false</selenium.debug>
      <application.deploy.timeout>300</application.deploy.timeout>      
   </properties>

   <!-- Dependency management, including any extra repositories needed -->
   <repositories>
      <repository>
         <id>oss.sonatype.org/jboss-snapshots</id>
         <name>JBoss (Nexus) Snapshots Repository</name>
         <url>http://oss.sonatype.org/content/repositories/jboss-snapshots</url>
         <releases>
            <enabled>false</enabled>
         </releases>
         <snapshots>
            <enabled>true</enabled>
            <updatePolicy>never</updatePolicy>
         </snapshots>
      </repository>
   </repositories>

   <dependencyManagement>
      <dependencies>

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

         <dependency>
            <groupId>javax.faces</groupId>
            <artifactId>jsf-impl</artifactId>
            <version>${jsf.version}</version>
         </dependency>

         <dependency>
            <groupId>org.jboss.weld</groupId>
            <artifactId>weld-api-bom</artifactId>
            <version>${weld.api.version}</version>
            <type>pom</type>
            <scope>import</scope>
         </dependency>
         
         <dependency>
            <groupId>org.jboss.weld</groupId>
            <artifactId>weld-wicket</artifactId>
            <version>${weld.wicket.version}</version>
            <type>pom</type>
            <scope>import</scope>
         </dependency>
         
         <dependency>
            <groupId>org.jboss.weld</groupId>
            <artifactId>weld-wicket</artifactId>
            <version>${weld.wicket.version}</version>
         </dependency>

         <dependency>
            <groupId>org.jboss.weld.servlet</groupId>
            <artifactId>weld-servlet</artifactId>
            <version>${weld.servlet.version}</version>
         </dependency>


         <dependency>
            <groupId>org.jboss.weld</groupId>
            <artifactId>weld-se</artifactId>
            <version>${weld.se.version}</version>
         </dependency>


         <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>${testng.version}</version>
            <classifier>jdk15</classifier>
         </dependency>

         <dependency>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jetty</artifactId>
            <version>${jetty.version}</version>
         </dependency>

         <dependency>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jetty-plus</artifactId>
            <version>${jetty.version}</version>
         </dependency>

         <dependency>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jsp-2.1-jetty</artifactId>
            <version>${jetty.version}</version>
         </dependency>

         <dependency>
            <groupId>org.glassfish.web</groupId>
            <artifactId>el-impl</artifactId>
            <version>${uel.glassfish.version}</version>
         </dependency>

      </dependencies>
   </dependencyManagement>

   <build>
      <plugins>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-release-plugin</artifactId>
            <configuration>
               <tagBase>https://svn.jboss.org/repos/weld/examples/tags</tagBase>
            </configuration>
         </plugin>

      </plugins>

      <pluginManagement>
         <plugins>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-ejb-plugin</artifactId>
               <configuration>
                  <ejbVersion>3.0</ejbVersion>
               </configuration>
            </plugin>
         </plugins>
      </pluginManagement>
   </build>

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

   <profiles>
      <profile>
         <id>ftest-jboss-remote-51</id>
         <activation>
            <activeByDefault>false</activeByDefault>
         </activation>

         <pluginRepositories>
            <pluginRepository>
               <id>repository.codehaus.repository</id>
               <url>http://repository.codehaus.org/</url>
               <releases>
                  <enabled>true</enabled>
               </releases>
               <snapshots>
                  <enabled>true</enabled>
                  <updatePolicy>never</updatePolicy>
               </snapshots>
            </pluginRepository>
         </pluginRepositories>

         <properties>
            <ftest.testsuite>jboss5x.xml</ftest.testsuite>
         </properties>

         <dependencies>
            <dependency>
               <groupId>org.seleniumhq.selenium.client-drivers</groupId>
               <artifactId>selenium-java-client-driver</artifactId>
               <version>${selenium.java.client.version}</version>
               <scope>test</scope>
            </dependency>
         </dependencies>

         <build>
            <pluginManagement>
               <plugins>
                  <!-- get functional tests from ftest artifact -->
                  <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-dependency-plugin</artifactId>
                     <executions>
                        <execution>
                           <id>copy-ftest</id>
                           <phase>process-sources</phase>
                           <goals>
                              <goal>copy</goal>
                           </goals>
                           <configuration>
                              <outputDirectory>${project.build.directory}/ftest</outputDirectory>
                              <stripVersion>true</stripVersion>
                              <artifactItems>
                                 <artifactItem>
                                    <groupId>org.jboss.weld.examples.ftest</groupId>
                                    <artifactId>${ftest.artifact}</artifactId>
                                    <overWrite>true</overWrite>
                                 </artifactItem>
                              </artifactItems>
                           </configuration>
                        </execution>
                     </executions>
                  </plugin>

                  <!-- deploy/undeploy application archive to/from container -->
                  <plugin>
                     <groupId>org.codehaus.cargo</groupId>
                     <artifactId>cargo-maven2-plugin</artifactId>
                     <version>${cargo.maven2.plugin.version}</version>
                     <configuration>
                        <container>
                           <containerId>jboss5x</containerId>
                           <type>remote</type>
                        </container>
                        <configuration>
                           <type>runtime</type>
                        </configuration>
                     </configuration>
                     <executions>
                        <execution>
                           <id>deploy</id>
                           <phase>pre-integration-test</phase>
                           <goals>
                              <goal>deploy</goal>
                           </goals>
                        </execution>
                        <execution>
                           <id>undeploy</id>
                           <phase>post-integration-test</phase>
                           <goals>
                              <goal>undeploy</goal>
                           </goals>
                        </execution>
                     </executions>
                  </plugin>

                  <!--  start Selenium server -->
                  <plugin>
                     <groupId>org.codehaus.mojo</groupId>
                     <artifactId>selenium-maven-plugin</artifactId>
                     <version>${selenium.maven.plugin.version}</version>
                     <executions>
                        <execution>
                           <id>start-selenium</id>
                           <phase>pre-integration-test</phase>
                           <goals>
                              <goal>start-server</goal>
                           </goals>
                           <configuration>
                              <background>true</background>
                              <port>${selenium.server.port}</port>
                              <logOutput>true</logOutput>
										<browserSideLog>${selenium.debug}</browserSideLog>
										<debug>${selenium.debug}</debug>
                           </configuration>
                        </execution>
                        <!--
                           this can't be used until plugin sends the
                           right command, using Ant GET instead
                        -->
                        <!--
                           <execution> <id>stop-selenium</id>
                           <phase>post-integration-test</phase> <goals>
                           <goal>stop-server</goal> </goals>
                           <configuration>
                           <port>${selenium.server.port}</port>
                           </configuration> </execution>
                        -->
                     </executions>
                  </plugin>

                  <!-- run functional tests -->
                  <plugin>
                     <groupId>org.codehaus.mojo</groupId>
                     <artifactId>failsafe-maven-plugin</artifactId>
                     <version>${failsafe.maven.plugin.version}</version>
                     <configuration>
                        <testClassesDirectory>${project.build.directory}/ftest</testClassesDirectory>
                        <suiteXmlFiles>
                           <suiteXmlFile>src/test/selenium/${ftest.testsuite}</suiteXmlFile>
                        </suiteXmlFiles>
                        <argLine>-Xmx748m</argLine>
                        <forkMode>once</forkMode>
                        <systemProperties>
                           <property>
                              <name>selenium.server.port</name>
                              <value>${selenium.server.port}</value>
                           </property>
                           <property>
                              <name>selenium.server.host</name>
                              <value>${selenium.server.host}</value>
                           </property>
                           <property>
                              <name>selenium.browser</name>
                              <value>${selenium.browser}</value>
                           </property>
                           <property>
                              <name>selenium.browser.url</name>
                              <value>${selenium.browser.url}</value>
                           </property>
                           <property>
                              <name>selenium.speed</name>
                              <value>${selenium.speed}</value>
                           </property>
                           <property>
                              <name>selenium.timeout</name>
                              <value>${selenium.timeout}</value>
                           </property>
                           <property>
                              <name>basedir</name>
                              <value>${basedir}</value>
                           </property>
                        </systemProperties>
                     </configuration>
                     <executions>
                        <execution>
                           <id>integration-test</id>
                           <phase>integration-test</phase>
                           <goals>
                              <goal>integration-test</goal>
                           </goals>
                        </execution>
                        <execution>
                           <id>verify</id>
                           <phase>verify</phase>
                           <goals>
                              <goal>verify</goal>
                           </goals>
                        </execution>
                     </executions>
                  </plugin>


                  <!-- stop Selenium -->
                  <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-antrun-plugin</artifactId>
                     <version>${maven.antrun.plugin.version}</version>

                     <executions>
                        <!-- this ant script runs testng natively -->
                        <execution>
                           <id>stop-selenium</id>
                           <phase>post-integration-test</phase>
                           <configuration>
                              <tasks>
                                 <get taskname="selenium-shutdown" src="http://${selenium.server.host}:${selenium.server.port}/selenium-server/driver/?cmd=shutDownSeleniumServer" ignoreerrors="true" dest="${project.build.directory}/selenium.stop.msg" />
                                 <echo taskname="selenium-shutdown" message="DGF Errors during shutdown are expected" />
                              </tasks>
                           </configuration>
                           <goals>
                              <goal>run</goal>
                           </goals>
                        </execution>
                     </executions>
                  </plugin>
               </plugins>
            </pluginManagement>
         </build>
      </profile>
      <profile>
         <id>ftest-jboss-remote-60</id>
         <activation>
            <activeByDefault>false</activeByDefault>
         </activation>

         <pluginRepositories>
            <pluginRepository>
               <id>repository.codehaus.repository</id>
               <url>http://repository.codehaus.org/</url>
               <releases>
                  <enabled>true</enabled>
               </releases>
               <snapshots>
                  <enabled>true</enabled>
                  <updatePolicy>never</updatePolicy>
               </snapshots>
            </pluginRepository>
         </pluginRepositories>

         <properties>
            <ftest.testsuite>jboss5x.xml</ftest.testsuite>
         </properties>

         <dependencies>
            <dependency>
               <groupId>org.seleniumhq.selenium.client-drivers</groupId>
               <artifactId>selenium-java-client-driver</artifactId>
               <version>${selenium.java.client.version}</version>
               <scope>test</scope>
            </dependency>
         </dependencies>

         <build>
            <pluginManagement>
               <plugins>
                  <!-- get functional tests from ftest artifact -->
                  <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-dependency-plugin</artifactId>
                     <executions>
                        <execution>
                           <id>copy-ftest</id>
                           <phase>process-sources</phase>
                           <goals>
                              <goal>copy</goal>
                           </goals>
                           <configuration>
                              <outputDirectory>${project.build.directory}/ftest</outputDirectory>
                              <stripVersion>true</stripVersion>
                              <artifactItems>
                                 <artifactItem>
                                    <groupId>org.jboss.weld.examples.ftest</groupId>
                                    <artifactId>${ftest.artifact}</artifactId>
                                    <overWrite>true</overWrite>
                                 </artifactItem>
                              </artifactItems>
                           </configuration>
                        </execution>
                     </executions>
                  </plugin>

                  <!-- deploy/undeploy application archive to/from container -->
                  <plugin>
                     <groupId>org.codehaus.cargo</groupId>
                     <artifactId>cargo-maven2-plugin</artifactId>
                     <version>${cargo.maven2.plugin.version}</version>
                     <configuration>
                        <container>
                           <containerId>jboss5x</containerId>
                           <type>remote</type>
                        </container>
                        <configuration>
                           <type>runtime</type>
                        </configuration>
                     </configuration>
                     <executions>
                        <execution>
                           <id>deploy</id>
                           <phase>pre-integration-test</phase>
                           <goals>
                              <goal>deploy</goal>
                           </goals>
                        </execution>
                        <execution>
                           <id>undeploy</id>
                           <phase>post-integration-test</phase>
                           <goals>
                              <goal>undeploy</goal>
                           </goals>
                        </execution>
                     </executions>
                  </plugin>

                  <!--  start Selenium server -->
                  <plugin>
                     <groupId>org.codehaus.mojo</groupId>
                     <artifactId>selenium-maven-plugin</artifactId>
                     <version>${selenium.maven.plugin.version}</version>
                     <executions>
                        <execution>
                           <id>start-selenium</id>
                           <phase>pre-integration-test</phase>
                           <goals>
                              <goal>start-server</goal>
                           </goals>
                           <configuration>
                              <background>true</background>
                              <port>${selenium.server.port}</port>
                              <logOutput>true</logOutput>
										<logFile>${project.build.directory}/selenium/selenium-server.log</logFile>
										<browserSideLog>${selenium.debug}</browserSideLog>
										<debug>${selenium.debug}</debug>
                           </configuration>
                        </execution>
                        <!--
                           this can't be used until plugin sends the
                           right command, using Ant GET instead
                        -->
                        <!--
                           <execution> <id>stop-selenium</id>
                           <phase>post-integration-test</phase> <goals>
                           <goal>stop-server</goal> </goals>
                           <configuration>
                           <port>${selenium.server.port}</port>
                           </configuration> </execution>
                        -->
                     </executions>
                  </plugin>

                  <!-- run functional tests -->
                  <plugin>
                     <groupId>org.codehaus.mojo</groupId>
                     <artifactId>failsafe-maven-plugin</artifactId>
                     <version>${failsafe.maven.plugin.version}</version>
                     <configuration>
                        <testClassesDirectory>${project.build.directory}/ftest</testClassesDirectory>
                        <suiteXmlFiles>
                           <suiteXmlFile>src/test/selenium/${ftest.testsuite}</suiteXmlFile>
                        </suiteXmlFiles>
                        <argLine>-Xmx748m</argLine>
                        <forkMode>once</forkMode>
                        <systemProperties>
                           <property>
                              <name>selenium.server.port</name>
                              <value>${selenium.server.port}</value>
                           </property>
                           <property>
                              <name>selenium.server.host</name>
                              <value>${selenium.server.host}</value>
                           </property>
                           <property>
                              <name>selenium.browser</name>
                              <value>${selenium.browser}</value>
                           </property>
                           <property>
                              <name>selenium.browser.url</name>
                              <value>${selenium.browser.url}</value>
                           </property>
                           <property>
                              <name>selenium.speed</name>
                              <value>${selenium.speed}</value>
                           </property>
                           <property>
                              <name>selenium.timeout</name>
                              <value>${selenium.timeout}</value>
                           </property>
                           <property>
                              <name>basedir</name>
                              <value>${basedir}</value>
                           </property>
                        </systemProperties>
                     </configuration>
                     <executions>
                        <execution>
                           <id>integration-test</id>
                           <phase>integration-test</phase>
                           <goals>
                              <goal>integration-test</goal>
                           </goals>
                        </execution>
                        <execution>
                           <id>verify</id>
                           <phase>verify</phase>
                           <goals>
                              <goal>verify</goal>
                           </goals>
                        </execution>
                     </executions>
                  </plugin>


                  <!-- stop Selenium -->
                  <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-antrun-plugin</artifactId>
                     <version>${maven.antrun.plugin.version}</version>

                     <executions>
                        <!-- this ant script runs testng natively -->
                        <execution>
                           <id>stop-selenium</id>
                           <phase>post-integration-test</phase>
                           <configuration>
                              <tasks>
                                 <get taskname="selenium-shutdown" src="http://${selenium.server.host}:${selenium.server.port}/selenium-server/driver/?cmd=shutDownSeleniumServer" ignoreerrors="true" dest="${project.build.directory}/selenium.stop.msg" />
                                 <echo taskname="selenium-shutdown" message="DGF Errors during shutdown are expected" />
                              </tasks>
                           </configuration>
                           <goals>
                              <goal>run</goal>
                           </goals>
                        </execution>
                     </executions>
                  </plugin>
               </plugins>
            </pluginManagement>
         </build>
      </profile>
      
      <profile>
         <id>ftest-jboss-cluster-60</id>
         <activation>
            <activeByDefault>false</activeByDefault>
         </activation>

         <pluginRepositories>
            <pluginRepository>
               <id>repository.codehaus.repository</id>
               <url>http://repository.codehaus.org/</url>
               <releases>
                  <enabled>true</enabled>
               </releases>
               <snapshots>
                  <enabled>true</enabled>
                  <updatePolicy>never</updatePolicy>
               </snapshots>
            </pluginRepository>
         </pluginRepositories>

         <properties>
            <ftest.testsuite>jboss6x-cluster.xml</ftest.testsuite>
         </properties>

         <dependencies>
            <dependency>
               <groupId>org.seleniumhq.selenium.client-drivers</groupId>
               <artifactId>selenium-java-client-driver</artifactId>
               <version>${selenium.java.client.version}</version>
               <scope>test</scope>
            </dependency>
         </dependencies>

         <build>
            <pluginManagement>
               <plugins>
                  <!-- get functional tests from ftest artifact -->
                  <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-dependency-plugin</artifactId>
                     <executions>
                        <execution>
                           <id>copy-ftest</id>
                           <phase>process-sources</phase>
                           <goals>
                              <goal>copy</goal>
                           </goals>
                           <configuration>
                              <outputDirectory>${project.build.directory}/ftest</outputDirectory>
                              <stripVersion>true</stripVersion>
                              <artifactItems>
                                 <artifactItem>
                                    <groupId>org.jboss.weld.examples.ftest</groupId>
                                    <artifactId>${ftest.artifact}</artifactId>
                                    <overWrite>true</overWrite>
                                 </artifactItem>
                              </artifactItems>
                           </configuration>
                        </execution>
                     </executions>
                  </plugin>

                  <!--  start Selenium server -->
                  <plugin>
                     <groupId>org.codehaus.mojo</groupId>
                     <artifactId>selenium-maven-plugin</artifactId>
                     <version>${selenium.maven.plugin.version}</version>
                     <executions>
                        <execution>
                           <id>start-selenium</id>
                           <phase>pre-integration-test</phase>
                           <goals>
                              <goal>start-server</goal>
                           </goals>
                           <configuration>
                              <background>true</background>
                              <port>${selenium.server.port}</port>
                              <logOutput>true</logOutput>
										<logFile>${project.build.directory}/selenium/selenium-server.log</logFile>
										<browserSideLog>${selenium.debug}</browserSideLog>
										<debug>${selenium.debug}</debug>
                           </configuration>
                        </execution>
                        <!--
                           this can't be used until plugin sends the
                           right command, using Ant GET instead
                        -->
                        <!--
                           <execution> <id>stop-selenium</id>
                           <phase>post-integration-test</phase> <goals>
                           <goal>stop-server</goal> </goals>
                           <configuration>
                           <port>${selenium.server.port}</port>
                           </configuration> </execution>
                        -->
                     </executions>
                  </plugin>

                  <!-- run functional tests -->
                  <plugin>
                     <groupId>org.codehaus.mojo</groupId>
                     <artifactId>failsafe-maven-plugin</artifactId>
                     <version>${failsafe.maven.plugin.version}</version>
                     <configuration>
                        <testClassesDirectory>${project.build.directory}/ftest</testClassesDirectory>
                        <suiteXmlFiles>
                           <suiteXmlFile>src/test/selenium/${ftest.testsuite}</suiteXmlFile>
                        </suiteXmlFiles>
                        <argLine>-Xmx748m</argLine>
                        <forkMode>once</forkMode>
                        <systemProperties>
                           <property>
                              <name>selenium.server.port</name>
                              <value>${selenium.server.port}</value>
                           </property>
                           <property>
                              <name>selenium.server.host</name>
                              <value>${selenium.server.host}</value>
                           </property>
                           <property>
                              <name>selenium.browser</name>
                              <value>${selenium.browser}</value>
                           </property>
                           <property>
                              <name>selenium.browser.url</name>
                              <value>${selenium.browser.url}</value>
                           </property>
                           <property>
                              <name>selenium.speed</name>
                              <value>${selenium.speed}</value>
                           </property>
                           <property>
                              <name>selenium.timeout</name>
                              <value>${selenium.timeout}</value>
                           </property>
                           <property>
                              <name>basedir</name>
                              <value>${basedir}</value>
                           </property>
                           <property>
                              <name>jboss.config</name>
                              <value>${jboss.master.configuration}</value>
                           </property>
                        </systemProperties>
                     </configuration>
                     <executions>
                        <execution>
                           <id>integration-test</id>
                           <phase>integration-test</phase>
                           <goals>
                              <goal>integration-test</goal>
                           </goals>
                        </execution>
                        <execution>
                           <id>verify</id>
                           <phase>verify</phase>
                           <goals>
                              <goal>verify</goal>
                           </goals>
                        </execution>
                     </executions>
                  </plugin>


                  <!-- stop Selenium -->
                  <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-antrun-plugin</artifactId>
                     <version>${maven.antrun.plugin.version}</version>

                     <executions>
						<!-- deploy application to farm directory and waiting for the application to be ready				  -->
						<execution>
							<id>farm-example</id>
							<phase>pre-integration-test</phase>
							<configuration>
								<tasks>
									<property name="url.to.wait" value="http://localhost:8180/${project.build.finalName}" />												
									<copy file="${project.build.directory}/${project.build.finalName}.${project.packaging}" todir="${jboss.master.configuration}/farm" />
									<echo message="Waiting for application at ${url.to.wait}" />												
									<waitfor maxwait="${application.deploy.timeout}" maxwaitunit="second">								
										<http url="${url.to.wait}" errorsBeginAt="404" />
									</waitfor>
								</tasks>
							</configuration>
							<goals>
								<goal>run</goal>
							</goals>
						</execution>      
															               
						<!-- this ant script runs testng natively -->
						<execution>
							<id>stop-selenium</id>
							<phase>post-integration-test</phase>
							<configuration>
								<tasks>
									<echo message="Undeploying application..." />
									<delete file="${jboss.master.configuration}/farm/${project.build.finalName}.${project.packaging}" />
								
									<get taskname="selenium-shutdown" src="http://${selenium.server.host}:${selenium.server.port}/selenium-server/driver/?cmd=shutDownSeleniumServer" ignoreerrors="true" dest="${project.build.directory}/selenium.stop.msg" />
									<echo taskname="selenium-shutdown" message="DGF Errors during shutdown are expected" />
								</tasks>
							</configuration>
							<goals>
								<goal>run</goal>
							</goals>
						</execution>                        
                        
                     </executions>
                  </plugin>
               </plugins>
            </pluginManagement>
         </build>
      </profile>
      
   </profiles>
</project>

