Just like the unzip task, the zipgroupfileset should support a nested pattern set so that users can control which part of the source zip files should be copied into the destination zip file. This can be used to avoid having duplicate entries.
Because of having problems with sign artefacts inside merged jar files using the zipgroupfileset, i created a workaround (repackaging), which simulated the missing "nested pattern specification" - maybe someone is interested in it: <tempfile property="templib" destdir="@{destination}"/> <move tofile="${templib}" file="${libraryname}"/> <zip file="${libraryname}"> <zipfileset src="${templib}"> <exclude name="META-INF/*.SF"/> <!-- EXAMPLE: excludes the existing sign information, which confuse JavaWebstart --> </zipfileset> </zip> <delete file="${templib}" quiet="true"/> put this snipped into a task and use it.
*** This bug has been marked as a duplicate of bug 46257 ***
zipgroupfileset should support two separate pattern specs: one to identify jar/zip files and another to filter files within jars/zips (e.g. META-INF/*).