Author: mcconnell Date: Mon Jun 7 13:41:35 2004 New Revision: 20886 Modified: avalon/trunk/tools/project/core/src/main/org/apache/avalon/tools/tasks/JUnitTestTask.java Log: Update to work around a bug in JunitTask - the setting of the error and fail properties gets applied to registered unit tests so you need to set the values *after* setting the tests.
Modified: avalon/trunk/tools/project/core/src/main/org/apache/avalon/tools/tasks/JUnitTestTask.java ============================================================================== --- avalon/trunk/tools/project/core/src/main/org/apache/avalon/tools/tasks/JUnitTestTask.java (original) +++ avalon/trunk/tools/project/core/src/main/org/apache/avalon/tools/tasks/JUnitTestTask.java Mon Jun 7 13:41:35 2004 @@ -209,9 +209,6 @@ JUnitTask junit = (JUnitTask) getProject().createTask( "junit" ); junit.init(); - junit.setErrorProperty( ERROR_KEY ); - junit.setFailureProperty( FAILURE_KEY ); - JUnitTask.SummaryAttribute summary = new JUnitTask.SummaryAttribute(); summary.setValue( "on" ); junit.setPrintsummary( summary ); @@ -255,6 +252,9 @@ basedir.setKey( "basedir" ); basedir.setValue( base.toString() ); junit.addSysproperty( basedir ); + + junit.setErrorProperty( ERROR_KEY ); + junit.setFailureProperty( FAILURE_KEY ); junit.execute(); } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]