diff options
author | wisberg <wisberg> | 2005-10-14 05:04:56 +0000 |
---|---|---|
committer | wisberg <wisberg> | 2005-10-14 05:04:56 +0000 |
commit | c56d84b2235065fd401f6f105796dc401d8c9e5d (patch) | |
tree | 7e322facd3e89eb9700d812c10bb3bdf91ce34dd /build | |
parent | 7308e33ac72a6b3cb602912c948f8403cee32119 (diff) | |
download | aspectj-c56d84b2235065fd401f6f105796dc401d8c9e5d.tar.gz aspectj-c56d84b2235065fd401f6f105796dc401d8c9e5d.zip |
fix dup entries for target when assembling
Diffstat (limited to 'build')
-rw-r--r-- | build/src/org/aspectj/internal/tools/ant/taskdefs/AntBuilder.java | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/build/src/org/aspectj/internal/tools/ant/taskdefs/AntBuilder.java b/build/src/org/aspectj/internal/tools/ant/taskdefs/AntBuilder.java index 17ac98fac..88370753f 100644 --- a/build/src/org/aspectj/internal/tools/ant/taskdefs/AntBuilder.java +++ b/build/src/org/aspectj/internal/tools/ant/taskdefs/AntBuilder.java @@ -468,7 +468,7 @@ public class AntBuilder extends Builder { zip.setDestFile(result.getOutputFile()); ZipFileSet zipfileset = null; final Module module = result.getModule(); - List known = result.findKnownJarAntecedants(); + List known = result.findJarRequirements(); removeLibraryFilesToSkip(module, known); // -- merge any antecedents, less any manifest for (Iterator iter = known.iterator(); iter.hasNext();) { @@ -477,20 +477,17 @@ public class AntBuilder extends Builder { zipfileset.setProject(project); zipfileset.setSrc(jarFile); zipfileset.setIncludes("**/*"); - zipfileset.setExcludes("META-INF/MANIFEST.MF"); // XXXFileLiteral - zipfileset.setExcludes("META-INF/manifest.mf"); - zipfileset.setExcludes("meta-inf/manifest.mf"); - zipfileset.setExcludes("meta-inf/MANIFEST.MF"); + String name = jarFile.getName(); + name = name.substring(0, name.length()-4); // ".jar".length() + // required includes self - exclude manifest from others + if (!module.name.equals(name)) { + zipfileset.setExcludes("META-INF/MANIFEST.MF"); // XXXFileLiteral + zipfileset.setExcludes("META-INF/manifest.mf"); + zipfileset.setExcludes("meta-inf/manifest.mf"); + zipfileset.setExcludes("meta-inf/MANIFEST.MF"); + } zip.addZipfileset(zipfileset); } - - // merge the module jar itself, including same manifest (?) - zipfileset = new ZipFileSet(); - zipfileset.setProject(project); - Kind normal = Result.kind(result.getKind().isNormal(), !Result.ASSEMBLE); - File src = module.getResult(normal).getOutputFile(); - zipfileset.setSrc(src); - zip.addZipfileset(zipfileset); try { handler.log("assembling all " + module |