diff --git a/WHATSNEW b/WHATSNEW index 54485a2b8..ce5a822d4 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -82,6 +82,8 @@ Fixed bugs: * will now work on Unices with /bin/env instead of /usr/bin/env. Bugzilla Report 17642. +* could include multiple index lists. Bugzilla 10262. + Other changes: -------------- * Shipped XML parser is now Xerces 2.4.0 diff --git a/src/main/org/apache/tools/ant/taskdefs/Jar.java b/src/main/org/apache/tools/ant/taskdefs/Jar.java index c3e90e2db..80a2f4ad8 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Jar.java +++ b/src/main/org/apache/tools/ant/taskdefs/Jar.java @@ -466,7 +466,7 @@ public class Jar extends Zip { } /** - * Overriden from Zip class to deal with manifests + * Overriden from Zip class to deal with manifests and index lists. */ protected void zipFile(InputStream is, ZipOutputStream zOut, String vPath, long lastModified, File fromArchive, int mode) @@ -475,6 +475,10 @@ public class Jar extends Zip { if (! doubleFilePass || (doubleFilePass && skipWriting)) { filesetManifest(fromArchive, is); } + } else if (INDEX_NAME.equalsIgnoreCase(vPath) && index) { + log("Warning: selected " + archiveType + + " files include a META-INF/INDEX.LIST which will" + + " be replaced by a newly generated one.", Project.MSG_WARN); } else { super.zipFile(is, zOut, vPath, lastModified, fromArchive, mode); }