I'm creating some runnable JARs (desktop JavaFX applications).
I have a fileset of the 3rd party JARs I'm including:
<fileset id="shared_lib" dir="${aux.debian.lib.dir}">
<include name="commons-lang3-3.4.jar"/>
<include name="commons-io-2.4.jar"/>
...
</fileset>
And I then use zipgroupfileset to include those in the final runnable JAR:
<jar destfile="myapp.jar" filesetmanifest="mergewithoutmain">
<zipgroupfileset refid="shared_lib"/>
<manifest>
<attribute name="Main-Class" value="mypackage.myapp"/>
<attribute name="Class-Path" value="."/>
</manifest>
<fileset dir="./classes" />
</jar>
When I then run ProGuard I get the following warnings multiple times (as each of the zipped JARs contain a LICENSE.txt and NOTICE.txt):
[proguard] Warning: can't write resource [META-INF/LICENSE.txt] (Duplicate zip entry [myapp.jar:META-INF/LICENSE.txt])
[proguard] Warning: can't write resource [META-INF/NOTICE.txt] (Duplicate zip entry [myapp.jar:META-INF/NOTICE.txt])
I've tried the various exclude options when defining the fileset, but they only exclude files from the fileset, not from within the include JARs.
Is there away to simply filter what gets zipped as part of the zipgroupfileset? Perhaps in ProGuard?
This is only a minor annoyance, as everything works with the warnings, but it's annoying me that something that I have a feeling should be simple is eluding me.
duplicate="preserve"
to your<jar>
element, as described in the documentation? – VGR