You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by br...@apache.org on 2006/05/05 02:58:49 UTC

svn commit: r399904 - in /maven/plugins/trunk/maven-surefire-plugin/src: main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java site/apt/howto.apt

Author: brett
Date: Thu May  4 17:58:48 2006
New Revision: 399904

URL: http://svn.apache.org/viewcvs?rev=399904&view=rev
Log:
[MSUREFIRE-102] change the defaults for child delegation and forking

Modified:
    maven/plugins/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/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/plugin/surefire/SurefirePlugin.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java?rev=399904&r1=399903&r2=399904&view=diff
==============================================================================
--- maven/plugins/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java (original)
+++ maven/plugins/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java Thu May  4 17:58:48 2006
@@ -217,7 +217,7 @@
      * Option to specify the forking mode. Can be "never" (default), "once" or "always".
      * "none" and "pertest" are also accepted for backwards compatibility.
      *
-     * @parameter expression="${forkMode}" default-value="never"
+     * @parameter expression="${forkMode}" default-value="once"
      */
     private String forkMode;
 
@@ -258,7 +258,7 @@
      * xml parsers in the classpath and the Java 5 provider parser.
      *
      * @parameter expression="${childDelegation}"
-     * default-value="true"
+     * default-value="false"
      */
     private boolean childDelegation;
 

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=399904&r1=399903&r2=399904&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 Thu May  4 17:58:48 2006
@@ -109,7 +109,7 @@
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-surefire-plugin</artifactId>
       <configuration>
-        <forkMode>once|pertest</forkMode>
+        <forkMode>pertest</forkMode>
         <argLine>-enableassertions</argLine>
       </configuration>
     </plugin>
@@ -122,11 +122,13 @@
  <<Note:>> You do not need to manually enable assertions if you are using them in your unit tests - Surefire enables
  them on your test classes automatically under JDK 1.4+.
 
+ The default setting is <<<once>>>. It can also be set to <<<never>>> to run in process for a small performance improvement.
+
 * Class Loading Issues
 
- By default, Surefire loads classes "child first", like a web application - meaning your dependencies take precedence over those
- in the JDK. With endorsed APIs like XML parsers, this may cause problems. You can either make sure you provide a full, compatible
- implementation, or revert to "parent first" class loading by setting the <<<childDelegation>>> flag to <<<false>>>:
+ By default, Surefire loads classes using the default Java mechanism. However, it can be set to use "child first" classloading, like 
+ a web application - meaning your dependencies take precedence over those in the JDK.
+ If you find this is necessary, you can do so by setting the <<<childDelegation>>> flag to <<<true>>>:
 
 ----
 <project>
@@ -138,7 +140,7 @@
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
         <configuration>
-          <childDelegation>false</childDelegation>
+          <childDelegation>true</childDelegation>
         </configuration>       
 
       </plugin>