Author: jvanzyl
Date: Mon Dec 12 17:16:52 2005
New Revision: 356443

URL: http://svn.apache.org/viewcvs?rev=356443&view=rev
Log:
o adding support for general arg line processing to allow things like 
-enableassertions or
  any other arbitrary JVM options

Modified:
    
maven/plugins/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/test/SurefirePlugin.java
    maven/plugins/trunk/maven-surefire-plugin/src/site/apt/howto.apt

Modified: 
maven/plugins/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/test/SurefirePlugin.java
URL: 
http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/test/SurefirePlugin.java?rev=356443&r1=356442&r2=356443&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/test/SurefirePlugin.java
 (original)
+++ 
maven/plugins/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/test/SurefirePlugin.java
 Mon Dec 12 17:16:52 2005
@@ -188,7 +188,15 @@
      * default-value="java" 
      */
     private String jvm;    
-    
+
+    /**
+     * Option to specify the jvm (or path to the java executable) to use with
+     * the forking options. For the default we will assume that java is in the 
path.
+     *
+     * @parameter expression="${argLine}"
+     */
+    private String argLine;
+
     public void execute()
         throws MojoExecutionException
     {
@@ -225,6 +233,8 @@
         surefireBooter.setJvm( jvm );
 
         surefireBooter.setBasedir( basedir.getAbsolutePath() );
+
+        surefireBooter.setArgLine( argLine );
 
         // 
----------------------------------------------------------------------
         // Reporting

Modified: maven/plugins/trunk/maven-surefire-plugin/src/site/apt/howto.apt
URL: 
http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-surefire-plugin/src/site/apt/howto.apt?rev=356443&r1=356442&r2=356443&view=diff
==============================================================================
--- maven/plugins/trunk/maven-surefire-plugin/src/site/apt/howto.apt (original)
+++ maven/plugins/trunk/maven-surefire-plugin/src/site/apt/howto.apt Mon Dec 12 
17:16:52 2005
@@ -90,7 +90,9 @@
 * Forking
 
  If you need to run your tests in a new JVM process you can use the 
<<<forkMode>>> option to start a new
- JVM process once for all your tests, or start a new JVM process for each of 
your tests:
+ JVM process once for all your tests, or start a new JVM process for each of 
your tests. You can also set
+ any arbitrary options like <<<-enableassertions>>> or any other JVM options. 
Here's an example of what
+ this might look like:
 
 -----
 <project>
@@ -102,6 +104,7 @@
       <artifactId>maven-surefire-plugin</artifactId>
       <configuration>
         <forkMode>once|pertest</forkMode>
+        <argLine>-enableassertions</argLine>
       </configuration>
     </plugin>
     ...


Reply via email to