bodewig 2003/04/02 08:01:15
Modified: . WHATSNEW src/main/org/apache/tools/ant/taskdefs Jar.java Log: Ignore index lists found when creating a jar with index="on". PR: 10262 Revision Changes Path 1.386 +2 -0 ant/WHATSNEW Index: WHATSNEW =================================================================== RCS file: /home/cvs/ant/WHATSNEW,v retrieving revision 1.385 retrieving revision 1.386 diff -u -r1.385 -r1.386 --- WHATSNEW 2 Apr 2003 14:53:20 -0000 1.385 +++ WHATSNEW 2 Apr 2003 16:01:15 -0000 1.386 @@ -82,6 +82,8 @@ * <property env> will now work on Unices with /bin/env instead of /usr/bin/env. Bugzilla Report 17642. +* <jar index="on"> could include multiple index lists. Bugzilla 10262. + Other changes: -------------- * Shipped XML parser is now Xerces 2.4.0 1.73 +5 -1 ant/src/main/org/apache/tools/ant/taskdefs/Jar.java Index: Jar.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Jar.java,v retrieving revision 1.72 retrieving revision 1.73 diff -u -r1.72 -r1.73 --- Jar.java 22 Mar 2003 09:39:46 -0000 1.72 +++ Jar.java 2 Apr 2003 16:01:15 -0000 1.73 @@ -466,7 +466,7 @@ } /** - * 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 @@ 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); }