Author: jvanzyl Date: Tue Dec 13 17:24:18 2005 New Revision: 356675 URL: http://svn.apache.org/viewcvs?rev=356675&view=rev Log: o add debugging mode
Modified: maven/plugins/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/test/SurefirePlugin.java 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=356675&r1=356674&r2=356675&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 Tue Dec 13 17:24:18 2005 @@ -32,7 +32,7 @@ import java.util.StringTokenizer; /** - * @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a> + * @author Jason van Zyl * @version $Id$ * @requiresDependencyResolution test * @goal test @@ -176,27 +176,35 @@ * Option to specify the forking mode. * * @parameter expression="${forkMode}" - * default-value="none" + * default-value="none" */ private String forkMode; - + /** * 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="${jvm}" - * default-value="java" + * default-value="java" */ - private String jvm; + 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. + * Arbitrary options to set on the command line. * * @parameter expression="${argLine}" */ private String argLine; + /** + * 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="${childDelegation}" + * default-value="true" + */ + private boolean childDelegation; + public void execute() throws MojoExecutionException { @@ -223,23 +231,31 @@ // ---------------------------------------------------------------------- // Forking // ---------------------------------------------------------------------- - - getLog().info( "forkMode: " + forkMode ); - - surefireBooter.setForkMode( forkMode ); - surefireBooter.setSystemProperties( systemProperties ); + if ( !forkMode.equals( "none" ) ) + { + surefireBooter.setForkMode( forkMode ); + + surefireBooter.setSystemProperties( systemProperties ); - surefireBooter.setJvm( jvm ); + surefireBooter.setJvm( jvm ); - surefireBooter.setBasedir( basedir.getAbsolutePath() ); + surefireBooter.setBasedir( basedir.getAbsolutePath() ); - surefireBooter.setArgLine( argLine ); + surefireBooter.setArgLine( argLine ); + + surefireBooter.setChildDelegation( childDelegation ); + + if ( getLog().isDebugEnabled() ) + { + surefireBooter.setDebug( true ); + } + } // ---------------------------------------------------------------------- // Reporting // ---------------------------------------------------------------------- - + getLog().info( "Setting reports dir: " + reportsDirectory ); surefireBooter.setReportsDirectory( reportsDirectory );