This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
ea build020301: To reproduce: Create a new web module. Add a extra files: examples/advanced(this is from the sampledir) to WEB- INF/classes Turn on the include dependent files to true. View war contents. There is an error: org.netbeans.modules.web.war.packager.WarException:java.util.zip.ZipException:du plicate entry:WEB-INF/classes/examples/advanced/MemoryView$6.class. if I copy examples/advanced to the WEB-INF/classes directory, turn on the include dependent files to true, view war content works fine.
If I understand well the problem occurs when you add some directory such as examples/advanced and set its target directory to WEB-INF/classes/examples/advanced and set include dependent files to true. That's how I reproduced this. I am not sure if this is common case so I suggest to dowgrade this to P3. Technically: Extra files (content examples/advanced) are added to archive as ArchiveMember elements before begining of packing. The duplicates classes are also calculated before packing but they are added later when ArchiveMembers are processed to ArchiveEntries as ArchiveEntry objects so it is difficult to check all these object for duplicities. I don't see any simple fix and I would like to avoid risky patches.
Created attachment 5076 [details] JAR packager patch to avoid adding duplicated entries
Roger, can you review attached patch and evaluate whether it can be applied to jar packager? It seems to be very difficult to fix it inside web module but this looks like possible solution (at least it fixes this bug).
Fix looks good to me. I've integrated it into trunk and will try to get it into Orion release.
Commited into orion_fcs too.
Verified
Resolved for 3.4 or earlier, no new info since then -> closing.