Hi,
The bug documented as
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5092
for ANT 1.5 nightly builds also appears in 1.4.1
It's a bug in class org.apache.tools.ant.taskdefs.Zip, resulting in
the <jar> task always rebuilding jars, even when update="true"
is selected.
I have created a patch to apply the resolution proposed in bug 5092
to 1.4.1 (see attached).
What's the desired way of handling this. Shall I open a new bugzilla
entry, this time for 1.4.1 and append the patch to it?
What about 1.4 then?
Thanks,
Sascha
--
Sascha Woyde
Configuration Management
Gauss Interprise AG
Research & Development
mail: [EMAIL PROTECTED]
http://www.gaussvip.com
Visit us at our CeBIT booth (13th - 20th March) in Hannover, hall 6 - booth C11.
--- origZip.java Thu Oct 11 22:58:30 2001
+++ patchedZip.java Thu Mar 14 11:25:29 2002
@@ -194,6 +194,25 @@
throw new BuildException("You must specify the " + archiveType + "
file to create!");
}
+ // Create the scanners to pass to isUpToDate().
+ Vector dss = new Vector ();
+ if (baseDir != null) {
+ dss.addElement(getDirectoryScanner(baseDir));
+ }
+ for (int i=0; i<filesets.size(); i++) {
+ FileSet fs = (FileSet) filesets.elementAt(i);
+ dss.addElement (fs.getDirectoryScanner(project));
+ }
+ int dssSize = dss.size();
+ FileScanner[] scanners = new FileScanner[dssSize];
+ dss.copyInto(scanners);
+
+ // quick exit if the target is up to date
+ // can also handle empty archives
+ if (isUpToDate(scanners, zipFile)) {
+ return;
+ }
+
// Renamed version of original file, if it exists
File renamedFile = null;
// Whether or not an actual update is required -
@@ -230,25 +249,6 @@
}
}
- // Create the scanners to pass to isUpToDate().
- Vector dss = new Vector ();
- if (baseDir != null) {
- dss.addElement(getDirectoryScanner(baseDir));
- }
- for (int i=0; i<filesets.size(); i++) {
- FileSet fs = (FileSet) filesets.elementAt(i);
- dss.addElement (fs.getDirectoryScanner(project));
- }
- int dssSize = dss.size();
- FileScanner[] scanners = new FileScanner[dssSize];
- dss.copyInto(scanners);
-
- // quick exit if the target is up to date
- // can also handle empty archives
- if (isUpToDate(scanners, zipFile)) {
- return;
- }
-
String action = reallyDoUpdate ? "Updating " : "Building ";
log(action + archiveType +": "+ zipFile.getAbsolutePath());
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>