Browse Source

Ignore index lists found when creating a jar with index="on".

PR: 10262


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274378 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 22 years ago
parent
commit
2998653672
2 changed files with 7 additions and 1 deletions
  1. +2
    -0
      WHATSNEW
  2. +5
    -1
      src/main/org/apache/tools/ant/taskdefs/Jar.java

+ 2
- 0
WHATSNEW View File

@@ -82,6 +82,8 @@ Fixed bugs:
* <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


+ 5
- 1
src/main/org/apache/tools/ant/taskdefs/Jar.java View File

@@ -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);
}


Loading…
Cancel
Save