Community
Participate
Working Groups
See also bug #57666 which is related (but has to do with manifests): I have a META-INF/aop.xml file in my aspectpath and another one in the source path. That shouldn't even be a duplicate, because the aspectpath resource should NOT be copied to output at all. In AspectJ build: 1.5.1.20060309143651 I am now getting: java.util.zip.ZipException 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.writeOutxmlFile(AjBuildManager.java:549) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:320) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163) at org.aspectj.ajde.internal.CompilerAdapter.compile(CompilerAdapter.java:122) at org.aspectj.ajde.internal.AspectJBuildManager$CompilerThread.run(AspectJBuildManager.java:191) ZipException thrown: duplicate entry: META-INF/aop.xml
I the problem is occuring because you are using either -outxml or -outxmlfile. Could you post the commandline or Ant options you are using? This option will generate an aop.xml file for those aspects visible to the weaver which is probably clashing with the one in the source path. We don't copy resources from aspectpath. Now of cause we shouldn't throw an exception so I propose the first come first served approach we used for manifests. Therefore in you case we will ignore the -outxml/outfile option. But should we issue and error/warning?
1. Added test for existing aop.xml to OutXmlTest 2. Modified NullIdeProperties to allow testProjectPath to be overriden by sourceRoots 3. Issue warning message inAjBuildManager.writeResource() to say -outxml ignored
You are right - there was both a META-INF/aop.xml file in the sources and an -outxml file option. The project was having this error in AJDT. Removing the -outxml option fixes the problem. Thanks and as you say this is a good condition to detect and warn about, with then not generating a file.
Fix available