diff --git a/WHATSNEW b/WHATSNEW index f9b434c10..2dcc80615 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -45,6 +45,9 @@ Fixed bugs: * Error in duplicate project name with and . Bugzilla report 39920. +* junit4 did not work with fork=no and junit4 in $ANT_HOME/lib. + Bugzilla report 40697. + Other changes: -------------- diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java index 887db1206..add0ce01b 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java @@ -1444,6 +1444,8 @@ public class JUnitTask extends Task { Project.MSG_VERBOSE); // make sure the test will be accepted as a TestCase classLoader.addSystemPackageRoot("junit"); + // make sure the test annotation are accepted + classLoader.addSystemPackageRoot("org.junit"); // will cause trouble in JDK 1.1 if omitted classLoader.addSystemPackageRoot("org.apache.tools.ant"); }