geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r439722 - in /geronimo/server/trunk/maven-plugins/selenium-maven-plugin/src: main/java/org/apache/geronimo/mavenplugins/selenium/StartServerMojo.java site/apt/usage.apt
Date Sun, 03 Sep 2006 05:14:25 GMT
Author: jdillon
Date: Sat Sep  2 22:14:24 2006
New Revision: 439722

URL: http://svn.apache.org/viewvc?rev=439722&view=rev
Log:
Added background flag to allow start to block or not block
Default is block, so that mvn selenium:start can be used for development

Modified:
    geronimo/server/trunk/maven-plugins/selenium-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/selenium/StartServerMojo.java
    geronimo/server/trunk/maven-plugins/selenium-maven-plugin/src/site/apt/usage.apt

Modified: geronimo/server/trunk/maven-plugins/selenium-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/selenium/StartServerMojo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/selenium-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/selenium/StartServerMojo.java?rev=439722&r1=439721&r2=439722&view=diff
==============================================================================
--- geronimo/server/trunk/maven-plugins/selenium-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/selenium/StartServerMojo.java
(original)
+++ geronimo/server/trunk/maven-plugins/selenium-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/selenium/StartServerMojo.java
Sat Sep  2 22:14:24 2006
@@ -131,6 +131,14 @@
      */
     private File errorFile = null;
 
+    /**
+     * Flag to control if we background the server or block Maven execution.
+     *
+     * @parameter default-value="false"
+     * @required
+     */
+    private boolean background = false;
+
     //
     // MojoSupport Hooks
     //
@@ -268,6 +276,13 @@
         }
 
         log.info("Selenium server started");
+
+        if (!background) {
+            log.info("Waiting for Selenium to shutdown...");
+            synchronized (this) {
+                wait();
+            }
+        }
     }
 
     /**

Modified: geronimo/server/trunk/maven-plugins/selenium-maven-plugin/src/site/apt/usage.apt
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/selenium-maven-plugin/src/site/apt/usage.apt?rev=439722&r1=439721&r2=439722&view=diff
==============================================================================
--- geronimo/server/trunk/maven-plugins/selenium-maven-plugin/src/site/apt/usage.apt (original)
+++ geronimo/server/trunk/maven-plugins/selenium-maven-plugin/src/site/apt/usage.apt Sat Sep
 2 22:14:24 2006
@@ -7,10 +7,11 @@
 
 Basic Usage
 
-* Start Selenium Server
+* Start Selenium Server (Integrated)
 
  For integration tests that need a Selenium server, use the <<<pre-integration-test>>>
- phase to start it up.
+ phase to start it up in the <background> to allow the <<<integration-test>>>
phase to
+ be executed with the server running.
  
  <<NOTE:>> Currently there is no <stop>, the forked JVM will exit when
Maven does.
  
@@ -35,8 +36,27 @@
             <goals>
                 <goal>start</goal>
             </goals>
+            <configuration>
+                <background>true</background>
+            </configuration>
         </execution>
     </executions>
 </plugin>
++----------+
+
+* Start Selenium Server (Standalone)
+
+ To start Selenium on the command line, which is very useful while developing tests,
+ simply execute the <<<start>>> goal.
+
+ This will start the server and block until the server has been stopped, either
+ from the process being killed, or more normally, until CTRL-C is used to exit
+ Maven.
+
+ This is the preferred mechanism to start the server standalone, as it will setup
+ <<<user-extensions.js>>>.
+
++----------+
+mvn selenium:start
 +----------+
 



Mime
View raw message