You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ca...@apache.org on 2006/06/19 17:00:55 UTC

svn commit: r415350 - in /maven/plugins/trunk/maven-surefire-plugin: pom.xml src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java

Author: carlos
Date: Mon Jun 19 08:00:54 2006
New Revision: 415350

URL: http://svn.apache.org/viewvc?rev=415350&view=rev
Log:
[MSUREFIRE-136] Added option to redirect test output to a file, redirectTestOutputToFile

Modified:
    maven/plugins/trunk/maven-surefire-plugin/pom.xml
    maven/plugins/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java

Modified: maven/plugins/trunk/maven-surefire-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-surefire-plugin/pom.xml?rev=415350&r1=415349&r2=415350&view=diff
==============================================================================
--- maven/plugins/trunk/maven-surefire-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-surefire-plugin/pom.xml Mon Jun 19 08:00:54 2006
@@ -25,7 +25,7 @@
     <dependency>
       <groupId>org.apache.maven.surefire</groupId>
       <artifactId>surefire-booter</artifactId>
-      <version>2.0</version>
+      <version>2.1-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>

Modified: maven/plugins/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java?rev=415350&r1=415349&r2=415350&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 Mon Jun 19 08:00:54 2006
@@ -66,7 +66,7 @@
 public class SurefirePlugin
     extends AbstractMojo
 {
-    /**
+	/**
      * Set this to 'true' to bypass unit tests entirely. Its use is NOT RECOMMENDED, but quite convenient on occasion.
      *
      * @parameter expression="${maven.test.skip}"
@@ -214,6 +214,15 @@
     private boolean useFile;
 
     /**
+     * When forking, set this to true to redirect the unit test standard output to a file 
+     * (found in reportsDirectory/testName-output.txt)
+     * 
+     * @parameter expression="${maven.test.redirectTestOutputToFile}"
+     * @default-value="false"
+     */
+    private boolean redirectTestOutputToFile;
+
+    /**
      * Option to specify the forking mode. Can be "never", "once" or "always".
      * "none" and "pertest" are also accepted for backwards compatibility.
      *
@@ -607,9 +616,13 @@
             }
         }
 
+        surefireBooter.setRedirectTestOutputToFile( redirectTestOutputToFile );
+
         surefireBooter.setForkConfiguration( fork );
 
         surefireBooter.setChildDelegation( childDelegation );
+
+        surefireBooter.setReportsDirectory( reportsDirectory );
 
         addReporters( surefireBooter, fork.isForking() );