Browse Source

Fix for junit4

in JUnit4 annotations are placed in org.junit,
so this package needs to be made a "systempackage" for fork=no to work.
Bugzilla report 40697



git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@454027 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 18 years ago
parent
commit
3822ba4a35
2 changed files with 5 additions and 0 deletions
  1. +3
    -0
      WHATSNEW
  2. +2
    -0
      src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java

+ 3
- 0
WHATSNEW View File

@@ -45,6 +45,9 @@ Fixed bugs:
* Error in duplicate project name with <import> and <antcall>.
Bugzilla report 39920.

* junit4 did not work with fork=no and junit4 in $ANT_HOME/lib.
Bugzilla report 40697.

Other changes:
--------------



+ 2
- 0
src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java View File

@@ -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");
}


Loading…
Cancel
Save