From 9af46a2ca05b7e2da738a1688ff679445f2c1a6e Mon Sep 17 00:00:00 2001
From: "Jesse N. Glick"
Date: Mon, 27 Feb 2006 22:24:26 +0000
Subject: [PATCH] #38799: task should work so long as junit.jar present
in even if not among Ant libs.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@381467 13f79535-47bb-0310-9956-ffa450edef68
---
WHATSNEW | 4 +-
docs/manual/OptionalTasks/junit.html | 29 ++--
docs/manual/install.html | 4 +-
.../org/apache/tools/ant/AntClassLoader.java | 6 +-
.../optional/junit/FormatterElement.java | 15 +-
.../optional/junit/JUnitResultFormatter.java | 4 +-
.../taskdefs/optional/junit/JUnitTask.java | 143 ++++++++++++++----
.../optional/junit/JUnitTaskMirror.java | 110 ++++++++++++++
.../optional/junit/JUnitTaskMirrorImpl.java | 72 +++++++++
.../optional/junit/JUnitTestRunner.java | 44 ++----
.../junit/SummaryJUnitResultFormatter.java | 2 +-
xdocs/faq.xml | 6 +-
12 files changed, 351 insertions(+), 88 deletions(-)
create mode 100644 src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTaskMirror.java
create mode 100644 src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTaskMirrorImpl.java
diff --git a/WHATSNEW b/WHATSNEW
index 1827e1010..3d6f67791 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -1,4 +1,4 @@
-Changes from current Ant 1.6.5 version to current RCS version
+Changes from current Ant 1.6.5 version to current SVN version
=============================================================
Changes that could break older environments:
@@ -77,6 +77,8 @@ Changes that could break older environments:
Fixed bugs:
-----------
+* can now work with junit.jar in its . Bugzilla Report 38799.
+
* Some potential NullPointerExceptions, Bugzilla Reports 37765 and 38056
* Problem when adding multiple filter files, Bugzilla Report 37341
diff --git a/docs/manual/OptionalTasks/junit.html b/docs/manual/OptionalTasks/junit.html
index b00ef6ba6..6ee7b242c 100644
--- a/docs/manual/OptionalTasks/junit.html
+++ b/docs/manual/OptionalTasks/junit.html
@@ -19,12 +19,12 @@ Library Dependencies for more information.
Note:
-You must have junit.jar
and the class files for the
-<junit>
task in the same classpath.
+You must have junit.jar
available.
You can do one of:
+
-
-Put both
junit.jar
and the optional tasks jar file in
+Put both junit.jar
and ant-junit.jar
in
ANT_HOME/lib
.
-
@@ -32,15 +32,23 @@ Do not put either in
ANT_HOME/lib
, and instead
include their locations in your CLASSPATH
environment variable.
-
-Do neither of the above, and instead, specify their locations using
-a
<classpath>
element in the build file.
-
+Add both JARs to your classpath using -lib
.
+
+-
+Specify the locations of both JARs using
+a
<classpath>
element in a <taskdef>
in the build file.
+
+-
+Leave
ant-junit.jar
in its default location in ANT_HOME/lib
+but include junit.jar
in the <classpath>
passed
+to <junit>
. (since Ant 1.7)
+
+
+
See the
FAQ for details.
-
-
Tests are defined by nested test
or
batchtest
tags (see nested
elements).
@@ -217,6 +225,9 @@ supports a nested <classpath>
element that represents a PATH like
structure.
+As of Ant 1.7, this classpath may be used to refer to junit.jar
+as well as your tests and the tested code.
+
jvmarg
If fork
is enabled, additional parameters may be passed to
@@ -580,7 +591,7 @@ aborted. Results are collected in files named
${reports.tests}
.
-Copyright © 2000-2005 The Apache Software Foundation. All rights
+
Copyright © 2000-2006 The Apache Software Foundation. All rights
Reserved.