Community
Participate
Working Groups
(Ah, the joy of build infrastructure...) Mostly self-explanatory trace, from a build Monday Apr 5, 2004 at 08:46:01 GMT: duplicate entry: META-INF/MANIFEST.MF duplicate entry: META-INF/MANIFEST.MF java.util.zip.ZipException: duplicate entry: META-INF/MANIFEST.MF at java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:163) at java.util.jar.JarOutputStream.putNextEntry(JarOutputStream.java:90) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.writeResource(AjBuildManager.java:344) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.copyResourcesFromJarFile(AjBuildManager.java:288) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.copyResourcesToDestination(AjBuildManager.java:253) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:195) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:94) at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:102) at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:53) at org.aspectj.tools.ajc.Main.run(Main.java:280) at org.aspectj.tools.ajc.Main.runMain(Main.java:217) at org.aspectj.tools.ajc.Main.main(Main.java:79)
There are several routes into this code. Could you attach a testcase or describe what you were doing when the failure occured. Thanks
Sorry, no time now to try to create a test case. Perhaps the manifest file automatically included when the zip is created is not added to the list of known resources in AjState.
*** Bug 66267 has been marked as a duplicate of this bug. ***
Using a JarInputStream is a bit of a minefield. Its behaviour, especially WRT "getManifest()", varies accounding to how the JAR file was build: ZIP vs JAR. To ensure the first orginal manfiest encountered is copied injars/inpath to outjar: 1. Use JarFile rather than JarInputStream 2. Explicitly test for "META-INF/MANIFEST.MF" entry 3. Add DiplicateManifestTest to weave a JAR built using ZIP
Created attachment 13683 [details] Testcase and fix ajde: testcase & data ajdt: AjBuildManager & BcweaverJarMaker weaver: BcelWeaver 1. Apply 3 patches and import ZIP 2. Run BcweaverJarMaker and run "ajde/testdata/DuplicateManifestTest/update-injar.xml (Ant) to create injar.jar and aspectjar.jar
Matthews fix integrated. Waiting for build note before closing bug.
Fix available: BUILD COMPLETE - build.325 Date of build: 08/02/2004 17:56:01 Time to build: 89 minutes 54 seconds Last changed: 08/02/2004 16:47:52 Last log entry: Fix for Bugzilla Bug 57666 duplicate manifests cause resource-copying to gack(Contributed by Matthew Webster) Latest good AspectJ jar available at: download.eclipse.org/technology/ajdt/dev/aspectj-DEVELOPMENT.jar
Fix released as part of AspectJ 1.2.1