diff --git a/docs/manual/CoreTasks/filter.html b/docs/manual/CoreTasks/filter.html
index db6f83e9a..f9ffed5b7 100644
--- a/docs/manual/CoreTasks/filter.html
+++ b/docs/manual/CoreTasks/filter.html
@@ -44,7 +44,7 @@ filtersfile attribute.
* see notes 1 and 2 above parameters table.
Examples
<filter token="year" value="2000"/>
- <copy todir="${dest.dir}">
+ <copy todir="${dest.dir}" filtering="true">
<fileset dir="${src.dir}"/>
</copy>
will copy recursively all the files from the src.dir directory into
diff --git a/docs/manual/CoreTasks/javadoc.html b/docs/manual/CoreTasks/javadoc.html
index 5f91071a5..f46c09a92 100644
--- a/docs/manual/CoreTasks/javadoc.html
+++ b/docs/manual/CoreTasks/javadoc.html
@@ -339,7 +339,9 @@ instead.
additionalparam |
- Lets you add additional parameters to the javadoc command line. Useful for doclets |
+ Lets you add additional parameters to the javadoc
+ command line. Useful for doclets. Parameters containing
+ spaces need to be quoted using ". |
1.2 |
No |
diff --git a/docs/manual/OptionalTasks/javah.html b/docs/manual/OptionalTasks/javah.html
new file mode 100644
index 000000000..5787fe19d
--- /dev/null
+++ b/docs/manual/OptionalTasks/javah.html
@@ -0,0 +1,117 @@
+
+
+
+
+Ant
+
+
+
+
+
+Description
+Generates JNI headers from a Java class.
+ When this task executes, it will generate the C header and source files that
+are needed to implement native methods. JNI operates differently depending on
+whether JDK1.2
+(or later) or pre-JDK1.2
+systems are used.
+Parameters
+
+
+ Attribute |
+ Description |
+ Required |
+
+
+ class |
+ the fully-qualified name of the class (or classes,
+ separated by commas) |
+ Yes |
+
+
+ outputFile |
+ concatenates the resulting header or source files for all the classes listed into this file |
+ Yes |
+
+
+ destdir |
+ sets the directory where javah saves the header files or the
+ stub files. |
+
+
+ force |
+ specifies that output files should always be written (JDK1.2 only) |
+ No |
+
+
+ old |
+ specifies that old JDK1.0-style header files should be generated
+ (otherwise output file contain JNI-style native method function prototypes) (JDK1.2 only) |
+ No |
+
+
+ stubs |
+ generate C declarations from the Java object file (used with old) |
+ No |
+
+
+ verbose |
+ causes Javah to print a message concerning the status of the generated files |
+ No |
+
+
+ classpath |
+ the classpath to use. |
+ No |
+
+
+ bootclasspath |
+ location of bootstrap class files. |
+ No |
+
+
+ extdirs |
+ location of installed extensions. |
+ No |
+
+
+Either outputFile or destdir must be supplied, but not both.
+Examples
+ <javah destdir="c" class="org.foo.bar.Wibble" />
+makes a JNI header of the named class, using the JDK1.2 JNI model. Assuming
+the directory 'c' already exists, the file org_foo_bar_Wibble.h
+is created there. If this file already exists, it is left unchanged.
+ <javah outputFile="wibble.h">
+ <class name="org.foo.bar.Wibble,org.foo.bar.Bobble"/>
+ </javah>
+is similar to the previous example, except the output is written to a file
+called wibble.h
+in the current directory.
+ <javah destdir="c" force="yes">
+ <class name="org.foo.bar.Wibble"/>
+ <class name="org.foo.bar.Bobble"/>
+ <class name="org.foo.bar.Tribble"/>
+ </javah>
+writes three header files, one for each of the classes named. Because the
+force option is set, these header files are always written when the Javah task
+is invoked, even if they already exist.
+ <javah destdir="c" verbose="yes" old="yes" force="yes">
+ <class name="org.foo.bar.Wibble"/>
+ <class name="org.foo.bar.Bobble"/>
+ <class name="org.foo.bar.Tribble"/>
+ </javah>
+ <javah destdir="c" verbose="yes" stubs="yes" old="yes" force="yes">
+ <class name="org.foo.bar.Wibble"/>
+ <class name="org.foo.bar.Bobble"/>
+ <class name="org.foo.bar.Tribble"/>
+ </javah>
+writes the headers for the three classes using the 'old' JNI format, then
+writes the corresponding .c stubs. The verbose option will cause Javah to
+describe its progress.
+
+
+
+
+
+
+
diff --git a/docs/manual/optionaltasklist.html b/docs/manual/optionaltasklist.html
index 1516c8f2c..792f32ba1 100644
--- a/docs/manual/optionaltasklist.html
+++ b/docs/manual/optionaltasklist.html
@@ -15,10 +15,12 @@
ANTLR
Cab
Clearcase Tasks
+Depend
EJB Tasks
FTP
-JavaCC
IContract
+JavaCC
+Javah
JJTree
Jlink
JUnit
@@ -26,15 +28,15 @@
MParse
Native2Ascii
NetRexxC
-PropertyFile
Perforce Tasks
+PropertyFile
Pvcs
RenameExtensions
Script
Sound
Stylebook
-Test
Telnet
+Test
Visual Age for Java Tasks
VssGet
VssLabel
diff --git a/src/etc/testcases/taskdefs/tar.xml b/src/etc/testcases/taskdefs/tar.xml
index 7c95f49ec..06935fbdf 100644
--- a/src/etc/testcases/taskdefs/tar.xml
+++ b/src/etc/testcases/taskdefs/tar.xml
@@ -1,6 +1,6 @@
-
+
@@ -14,4 +14,14 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/etc/testcases/taskdefs/zip.xml b/src/etc/testcases/taskdefs/zip.xml
index ce09aadba..1c8c63e2d 100644
--- a/src/etc/testcases/taskdefs/zip.xml
+++ b/src/etc/testcases/taskdefs/zip.xml
@@ -1,6 +1,6 @@
-
+
@@ -10,4 +10,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/etc/testcases/types/mapper.xml b/src/etc/testcases/types/mapper.xml
new file mode 100644
index 000000000..e9a8eedf3
--- /dev/null
+++ b/src/etc/testcases/types/mapper.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/org/apache/tools/ant/DirectoryScanner.java b/src/main/org/apache/tools/ant/DirectoryScanner.java
index 1b80b9beb..f2ca44e4e 100644
--- a/src/main/org/apache/tools/ant/DirectoryScanner.java
+++ b/src/main/org/apache/tools/ant/DirectoryScanner.java
@@ -736,7 +736,7 @@ strLoop:
* (2) an IO error occurred (why doesn't it throw an exception
* then???)
*/
- throw new BuildException("IO error scanning directory"
+ throw new BuildException("IO error scanning directory "
+ dir.getAbsolutePath());
}
diff --git a/src/main/org/apache/tools/ant/ProjectHelper.java b/src/main/org/apache/tools/ant/ProjectHelper.java
index 60766d15b..5e60d1a5c 100644
--- a/src/main/org/apache/tools/ant/ProjectHelper.java
+++ b/src/main/org/apache/tools/ant/ProjectHelper.java
@@ -104,12 +104,17 @@ public class ProjectHelper {
try {
SAXParser saxParser = getParserFactory().newSAXParser();
parser = saxParser.getParser();
-
+
String uri = "file:" + buildFile.getAbsolutePath().replace('\\', '/');
for (int index = uri.indexOf('#'); index != -1; index = uri.indexOf('#')) {
uri = uri.substring(0, index) + "%23" + uri.substring(index+1);
}
- saxParser.parse(uri, new RootHandler());
+
+ inputStream = new FileInputStream(buildFile);
+ inputSource = new InputSource(inputStream);
+ inputSource.setSystemId(uri);
+ project.log("parsing buildfile " + buildFile + " with URI = " + uri, Project.MSG_VERBOSE);
+ saxParser.parse(inputSource, new RootHandler());
}
catch(ParserConfigurationException exc) {
throw new BuildException("Parser has not been configured correctly", exc);
@@ -213,6 +218,8 @@ public class ProjectHelper {
public InputSource resolveEntity(String publicId,
String systemId) {
+ project.log("resolving systemId: " + systemId, Project.MSG_VERBOSE);
+
if (systemId.startsWith("file:")) {
String path = systemId.substring(5);
int index = path.indexOf("file:");
diff --git a/src/main/org/apache/tools/ant/taskdefs/Javadoc.java b/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
index 51b71d769..ab2e02cf2 100644
--- a/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
@@ -175,6 +175,19 @@ public class Javadoc extends Task {
}
}
+ private void add12ArgIfNotEmpty(String key, String value) {
+ if (!javadoc1) {
+ if (value != null && value.length() != 0) {
+ cmd.createArgument().setValue(key);
+ cmd.createArgument().setValue(value);
+ } else {
+ project.log(this,
+ "Warning: Leaving out empty argument '" + key + "'",
+ Project.MSG_WARN);
+ }
+ }
+ }
+
private void add11ArgIf(boolean b, String arg) {
if (javadoc1 && b) {
cmd.createArgument().setValue(arg);
@@ -226,7 +239,7 @@ public class Javadoc extends Task {
}
public void setAdditionalparam(String add){
- cmd.createArgument().setValue(add);
+ cmd.createArgument().setLine(add);
}
public void setSourcepath(Path src) {
@@ -387,35 +400,23 @@ public class Javadoc extends Task {
add12ArgIf(b, "-splitindex");
}
public void setWindowtitle(String src) {
- if (!javadoc1) {
- cmd.createArgument().setValue("-windowtitle");
- cmd.createArgument().setValue(src);
- }
+ add12ArgIfNotEmpty("-windowtitle", src);
}
public void setDoctitle(String src) {
- if (!javadoc1) {
- cmd.createArgument().setValue("-doctitle");
- cmd.createArgument().setValue(src);
- }
+ add12ArgIfNotEmpty("-doctitle", src);
}
public void setHeader(String src) {
- if (!javadoc1) {
- cmd.createArgument().setValue("-header");
- cmd.createArgument().setValue(src);
- }
+ add12ArgIfNotEmpty("-header", src);
}
+
public void setFooter(String src) {
- if (!javadoc1) {
- cmd.createArgument().setValue("-footer");
- cmd.createArgument().setValue(src);
- }
+ add12ArgIfNotEmpty("-footer", src);
}
+
public void setBottom(String src) {
- if (!javadoc1) {
- cmd.createArgument().setValue("-bottom");
- cmd.createArgument().setValue(src);
- }
+ add12ArgIfNotEmpty("-bottom", src);
}
+
public void setLinkoffline(String src) {
if (!javadoc1) {
LinkArgument le = createLink();
@@ -553,10 +554,7 @@ public class Javadoc extends Task {
}
public void setCharset(String src) {
- if (!javadoc1) {
- cmd.createArgument().setValue("-charset");
- cmd.createArgument().setValue(src);
- }
+ this.add12ArgIfNotEmpty("-charset", src);
}
/**
diff --git a/src/main/org/apache/tools/ant/taskdefs/Tar.java b/src/main/org/apache/tools/ant/taskdefs/Tar.java
index 4f1615f7d..da1183932 100644
--- a/src/main/org/apache/tools/ant/taskdefs/Tar.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Tar.java
@@ -175,7 +175,12 @@ public class Tar extends MatchingTask {
if (!archiveIsUpToDate(files)) {
upToDate = false;
- break;
+ }
+
+ for (int i = 0; i < files.length; ++i) {
+ if (tarFile.equals(new File(fs.getDir(project), files[i]))) {
+ throw new BuildException("A tar file cannot include itself", location);
+ }
}
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/Zip.java b/src/main/org/apache/tools/ant/taskdefs/Zip.java
index a5e98c1d0..fc005050f 100644
--- a/src/main/org/apache/tools/ant/taskdefs/Zip.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Zip.java
@@ -334,6 +334,12 @@ public class Zip extends MatchingTask {
return true;
}
} else {
+ for (int i = 0; i < files.length; ++i) {
+ if (files[i].equals(zipFile)) {
+ throw new BuildException("A zip file cannot include itself", location);
+ }
+ }
+
if (!zipFile.exists()) return false;
SourceFileScanner sfs = new SourceFileScanner(this);
@@ -459,6 +465,10 @@ public class Zip extends MatchingTask {
protected void zipFile(File file, ZipOutputStream zOut, String vPath)
throws IOException
{
+ if (file.equals(zipFile)) {
+ throw new BuildException("A zip file cannot include itself", location);
+ }
+
FileInputStream fIn = new FileInputStream(file);
try {
zipFile(fIn, zOut, vPath, file.lastModified());
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/depend/ClassFileUtils.java b/src/main/org/apache/tools/ant/taskdefs/optional/depend/ClassFileUtils.java
index b68fd15ff..745799917 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/depend/ClassFileUtils.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/depend/ClassFileUtils.java
@@ -73,31 +73,7 @@ public class ClassFileUtils {
* @return the class name in dot notation (eg. java.lang.Object).
*/
static public String convertSlashName(String name) {
- String dotName = null;
- int startIndex = 0;
- int sepIndex = 0;
-
- String slashName = name.replace('\\', '/');
- do {
- String component = null;
-
- sepIndex = slashName.indexOf('/', startIndex);
-
- if (sepIndex == -1) {
- component = slashName.substring(startIndex);
- } else {
- component = slashName.substring(startIndex, sepIndex);
- startIndex = sepIndex + 1;
- }
-
- if (dotName == null) {
- dotName = component;
- } else {
- dotName += "." + component;
- }
- } while (sepIndex != -1);
-
- return dotName;
+ return name.replace('\\', '.').replace( '/', '.' );
}
/**
@@ -108,31 +84,7 @@ public class ClassFileUtils {
* @return the class name in slash notation (eg. java/lang/Object).
*/
static public String convertDotName(String dotName) {
- String slashName = null;
- int startIndex = 0;
- int sepIndex = 0;
-
- do {
- String component = null;
-
- sepIndex = dotName.indexOf('.', startIndex);
-
- if (sepIndex == -1) {
- component = dotName.substring(startIndex);
- } else {
- component = dotName.substring(startIndex, sepIndex);
- startIndex = sepIndex + 1;
- }
-
- if (slashName == null) {
- slashName = component;
- } else {
- slashName += "/" + component;
- }
- } while (sepIndex != -1);
-
- return slashName;
+ return dotName.replace( '.', '/');
}
-
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java
index 36baaae1d..cfa15465a 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java
@@ -367,7 +367,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
args += " -compiler " + compiler;
}
- args += " -noexit " + sourceJar.getPath() + " " + destJar.getPath();
+ args += " " + sourceJar.getPath() + " " + destJar.getPath();
javaTask = (Java) getTask().getProject().createTask("java");
javaTask.setTaskName("ejbc");
@@ -384,7 +384,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
javaTask.setFork(true);
}
else {
- javaTask.setFork(false);
+ javaTask.setFork(true);
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java b/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java
index d79b40a48..53d8145f0 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java
@@ -171,18 +171,22 @@ public class JJTree extends Task {
cmdl.createArgument().setValue("-"+name+":"+value.toString());
}
- // load command line with required attributes
- if (outputDirectory != null) {
- if (!outputDirectory.isDirectory()) {
- throw new BuildException("Outputdir not a directory.");
- }
- cmdl.createArgument().setValue(
- "-OUTPUT_DIRECTORY:"+outputDirectory.getAbsolutePath());
- }
-
if (target == null || !target.isFile()) {
throw new BuildException("Invalid target: " + target);
}
+
+ // use the directory containing the target as the output directory
+ if (outputDirectory == null) {
+ outputDirectory = new File(target.getParent());
+ }
+ if (!outputDirectory.isDirectory() ) {
+ throw new BuildException("'outputdirectory' " + outputDirectory + " is not a directory.");
+ }
+ // convert backslashes to slashes, otherwise jjtree will put this as
+ // comments and this seems to confuse javacc
+ cmdl.createArgument().setValue(
+ "-OUTPUT_DIRECTORY:"+outputDirectory.getAbsolutePath().replace('\\', '/'));
+
final File javaFile = new File(
target.toString().substring(0, target.toString().indexOf(".jjt")) + ".jj");
if (javaFile.exists() && target.lastModified() < javaFile.lastModified()) {
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer.java b/src/main/org/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer.java
index 9cc9283fe..91dd51429 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer.java
@@ -281,19 +281,25 @@ public class AggregateTransformer {
}
protected void createCascadingStyleSheet() throws IOException, SAXException {
+ InputStream in = null;
if (styleDir == null) {
- InputStream in = getResourceAsStream("html/stylesheet.css");
- OutputStream out = new FileOutputStream( new File(toDir, "stylesheet.css"));
- copy(in, out);
+ in = getResourceAsStream("html/stylesheet.css");
+ } else {
+ in = new FileInputStream(new File(styleDir, "stylesheet.css"));
}
+ OutputStream out = new FileOutputStream( new File(toDir, "stylesheet.css"));
+ copy(in, out);
}
protected void createFrameStructure() throws IOException, SAXException{
+ InputStream in = null;
if (styleDir == null) {
- InputStream in = getResourceAsStream("html/index.html");
- OutputStream out = new FileOutputStream( new File(toDir, "index.html") );
- copy(in, out);
+ in = getResourceAsStream("html/index.html");
+ } else {
+ in = new FileInputStream(new File(styleDir, "index.html"));
}
+ OutputStream out = new FileOutputStream( new File(toDir, "index.html") );
+ copy(in, out);
}
/**
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java b/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java
index 102322a2b..2c960aee7 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java
@@ -161,15 +161,22 @@ public class JUnitTestRunner implements TestListener {
testClass = loader.loadClass(test.getName());
}
+ Method suiteMethod = null;
try {
- Method suiteMethod= testClass.getMethod("suite", new Class[0]);
- suite = (Test)suiteMethod.invoke(null, new Class[0]);
- } catch(NoSuchMethodException e) {
- } catch(InvocationTargetException e) {
- } catch(IllegalAccessException e) {
+ // check if there is a suite method
+ suiteMethod= testClass.getMethod("suite", new Class[0]);
+ } catch(Exception e) {
+ // no appropriate suite method found. We don't report any
+ // error here since it might be perfectly normal. We don't
+ // know exactly what is the cause, but we're doing exactly
+ // the same as JUnit TestRunner do. We swallow the exceptions.
}
-
- if (suite == null) {
+ if (suiteMethod != null){
+ // if there is a suite method available, then try
+ // to extract the suite from it. If there is an error
+ // here it will be caught below and reported.
+ suite = (Test)suiteMethod.invoke(null, new Class[0]);
+ } else {
// try to extract a test suite automatically
// this will generate warnings if the class is no suitable Test
suite= new TestSuite(testClass);
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/html/stylesheet.css b/src/main/org/apache/tools/ant/taskdefs/optional/junit/html/stylesheet.css
index 6a55ff839..a1f554991 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/html/stylesheet.css
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/html/stylesheet.css
@@ -28,8 +28,11 @@ H6 {
MARGIN-BOTTOM: 0.5em; FONT: bold 100% verdana,arial,helvetica
}
.Error {
- font-weight:bold; color:red;
+ font-weight:bold; background:#EEEEE0; color:purple;
}
.Failure {
- font-weight:bold; color:purple;
+ font-weight:bold; background:#EEEEE0; color:red;
+}
+.Pass {
+ background:#EEEEE0;
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/all-classes.xsl b/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/all-classes.xsl
index 25c03dc82..d4c80a2ed 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/all-classes.xsl
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/all-classes.xsl
@@ -1,10 +1,11 @@
-
-
+
@@ -23,6 +24,10 @@
+
@@ -37,4 +42,4 @@
|
-
\ No newline at end of file
+
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/all-packages.xsl b/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/all-packages.xsl
index 983d53ab7..b390357c4 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/all-packages.xsl
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/all-packages.xsl
@@ -1,9 +1,6 @@
-
-
-
@@ -39,4 +36,4 @@
-
\ No newline at end of file
+
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/class-details.xsl b/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/class-details.xsl
index 520ddae85..b4ccdd412 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/class-details.xsl
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/class-details.xsl
@@ -34,4 +34,4 @@
-
\ No newline at end of file
+
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/classes-list.xsl b/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/classes-list.xsl
index 49b0280b5..058b75621 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/classes-list.xsl
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/classes-list.xsl
@@ -1,6 +1,4 @@
-
-
@@ -43,4 +41,4 @@
-
\ No newline at end of file
+
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/overview-packages.xsl b/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/overview-packages.xsl
index 6b08620a0..98764ef7e 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/overview-packages.xsl
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/overview-packages.xsl
@@ -1,17 +1,8 @@
-
-
-
-
-
-
-
-
-
@@ -59,8 +50,18 @@
-
- Error |
+
+
+
+ Failure
+ Pass
+
+
+
+
+
+
+ |
@@ -70,8 +71,19 @@
-
- Error |
+
+
+
+ Failure
+ Pass
+
+
+
+
+
+
+
+ |
@@ -81,10 +93,17 @@
- Error |
- Error |
- Error |
- Error |
+
+ |
+
+ |
+
+ |
+
+
+
+
+ |
-
\ No newline at end of file
+
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/overview-summary.xsl b/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/overview-summary.xsl
index c9e80a329..513be7d5d 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/overview-summary.xsl
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/overview-summary.xsl
@@ -1,5 +1,4 @@
-
@@ -43,13 +42,16 @@
}
H6 {
MARGIN-BOTTOM: 0.5em; FONT: bold 100% verdana,arial,helvetica
- }
- .Error {
- font-weight:bold; color:red;
- }
- .Failure {
- font-weight:bold; color:purple;
- }
+ }
+ .Error {
+ font-weight:bold; background:#EEEEE0; color:purple;
+ }
+ .Failure {
+ font-weight:bold; background:#EEEEE0; color:red;
+ }
+ .Pass {
+ background:#EEEEE0;
+ }
@@ -95,19 +97,24 @@
-
+
+ Failure
Error
- Failure
+ Pass
|
|
|
|
- |
+
+
+
+
+ |
@@ -145,12 +152,13 @@
-
+
+ Failure
Error
- Failure
+ Pass
@@ -159,7 +167,11 @@
|
|
|
- |
+
+
+
+
+ |
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/package-summary.xsl b/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/package-summary.xsl
index 9cef8f621..87ee222eb 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/package-summary.xsl
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/package-summary.xsl
@@ -1,6 +1,4 @@
-
-
@@ -26,7 +24,16 @@
-
+
+
+
+
+
+ Failure
+ Error
+ Pass
+
+
|
|
|
@@ -52,12 +59,13 @@
-
+
+ Failure
Error
- Failure
+ Pass
@@ -66,8 +74,12 @@
|
|
|
- |
+
+
+
+
+ |
-
\ No newline at end of file
+
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/toolkit.xsl b/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/toolkit.xsl
index a52103a3a..c81a169f7 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/toolkit.xsl
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/xsl/toolkit.xsl
@@ -1,9 +1,28 @@
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -119,18 +138,27 @@
-
+
-
- Error
- TableRowColor
-
+
+ Failure
+ Error
+ Pass
+
|
|
|
- |
- |
+
+
+
+
+ |
+
+
+
+
+ |
Note: failures are anticipated and checked for with assertions while errors are unanticipated.
@@ -142,10 +170,12 @@
=====================================================================
-->
-
+
+
- Error
- TableRowColor
+ Failure
+ Error
+ Pass
|
@@ -160,10 +190,14 @@
Success |
- |
+ |
- |
+
+
+
+
+ |
@@ -201,4 +235,4 @@
-
\ No newline at end of file
+
diff --git a/src/main/org/apache/tools/ant/types/CommandlineJava.java b/src/main/org/apache/tools/ant/types/CommandlineJava.java
index dd4cbdd6d..c614094e7 100644
--- a/src/main/org/apache/tools/ant/types/CommandlineJava.java
+++ b/src/main/org/apache/tools/ant/types/CommandlineJava.java
@@ -189,7 +189,7 @@ public class CommandlineJava implements Cloneable {
result, pos, sysProperties.size());
pos += sysProperties.size();
}
- if (fullClasspath != null && fullClasspath.size() > 0) {
+ if (fullClasspath != null && fullClasspath.toString().trim().length() > 0) {
result[pos++] = "-classpath";
result[pos++] = fullClasspath.toString();
}
diff --git a/src/main/org/apache/tools/ant/types/Mapper.java b/src/main/org/apache/tools/ant/types/Mapper.java
index 5b3716ff3..96a9d5083 100644
--- a/src/main/org/apache/tools/ant/types/Mapper.java
+++ b/src/main/org/apache/tools/ant/types/Mapper.java
@@ -213,6 +213,10 @@ public class Mapper extends DataType {
throw be;
} catch (Throwable t) {
throw new BuildException(t);
+ } finally {
+ if (type != null) {
+ classname = null;
+ }
}
}
diff --git a/src/testcases/org/apache/tools/ant/taskdefs/TarTest.java b/src/testcases/org/apache/tools/ant/taskdefs/TarTest.java
index 437fa8028..64ee7593b 100644
--- a/src/testcases/org/apache/tools/ant/taskdefs/TarTest.java
+++ b/src/testcases/org/apache/tools/ant/taskdefs/TarTest.java
@@ -79,4 +79,11 @@ public class TarTest extends TaskdefsTest {
expectBuildException("test3", "required argument not specified");
}
+ public void test4() {
+ expectBuildException("test4", "tar cannot include itself");
+ }
+
+ public void tearDown() {
+ executeTarget("cleanup");
+ }
}
diff --git a/src/testcases/org/apache/tools/ant/taskdefs/ZipTest.java b/src/testcases/org/apache/tools/ant/taskdefs/ZipTest.java
index bc9487147..5d82d62be 100644
--- a/src/testcases/org/apache/tools/ant/taskdefs/ZipTest.java
+++ b/src/testcases/org/apache/tools/ant/taskdefs/ZipTest.java
@@ -74,4 +74,17 @@ public class ZipTest extends TaskdefsTest {
public void test2() {
expectBuildException("test2", "required argument not specified");
}
+
+ public void test3() {
+ expectBuildException("test3", "zip cannot include itself");
+ }
+
+ public void test4() {
+ expectBuildException("test4", "zip cannot include itself");
+ }
+
+ public void tearDown() {
+ executeTarget("cleanup");
+ }
+
}
diff --git a/src/testcases/org/apache/tools/ant/types/MapperTest.java b/src/testcases/org/apache/tools/ant/types/MapperTest.java
index 1835a1178..b4a599e0f 100644
--- a/src/testcases/org/apache/tools/ant/types/MapperTest.java
+++ b/src/testcases/org/apache/tools/ant/types/MapperTest.java
@@ -57,6 +57,7 @@ package org.apache.tools.ant.types;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.util.*;
+import org.apache.tools.ant.taskdefs.TaskdefsTest;
import junit.framework.TestCase;
import junit.framework.AssertionFailedError;
@@ -174,4 +175,24 @@ public class MapperTest extends TestCase {
assertEquals("a.java should match", 1, result.length);
assertEquals("a.class", result[0]);
}
+
+ public void testCopyTaskWithTwoFilesets() {
+ TaskdefForCopyTest t = new TaskdefForCopyTest("test1");
+ t.setUp();
+ t.test1();
+ }
+
+ private class TaskdefForCopyTest extends TaskdefsTest {
+ TaskdefForCopyTest(String name) {
+ super(name);
+ }
+
+ public void setUp() {
+ configureProject("src/etc/testcases/types/mapper.xml");
+ }
+
+ public void test1() {
+ executeTarget("test1");
+ }
+ }
}