I searched a lot, but I have not found any solution for this.
*** Eclipse Java EE IDE for Web Developers. Version: Kepler Release - Build id: 20130614-0229 with m2e-wtp - Maven Integration for WTP
1.0.0.20130612-1742
*** Windows 7 up to date
*** Java SDK 1.7.0-40
*** Maven: Embedded (3.0.4/1.4.0.20130531-2315)
Signing jars with (apache)maven-jar-plugin:2.4:sign (signing) on Linux works fine! The same maven project on Windows leads to the following error:
[INFO] jar is unsigned. (signatures missing or not parsable)
[ERROR] jarsigner: unable to sign jar: java.util.zip.ZipException: duplicate entry: META-INF/maven/.../pom.xml
I spotted different outputs between Linux and Windows from (apache)maven-jar-plugin:2.4:jar (default-jar)
Linux-Eclipse skips both files, because were already added:
...
[INFO] META-INF/maven/com.xyz/abc-client/pom.xml already added, skipping
[INFO] META-INF/maven/com.xyz/abc-client/pom.properties already added, skipping
...
after that the signing works fine!
The Windows ouput is not showing these two lines!!
I can not use the (apache)maven-jarsigner-plugin, because it will lead to following error - without solution:
[ERROR] jarsigner: cannot rename file jarfile.jar to .orig`
This github-forum website tells me that the m2e-wtp-plugin of Eclipse causing the problem, and that I should use maven on command line .... this is the absolutely last option to use!!!
Is there a possibility to get rid of this error? I cannot use the jarsigner-plugin, because of the "rename"-error and not the jar-plugin, because of the "duplicate entry"-error ... that is in fact a very strange situation.
In my case
maven clean install
fixed this issues
Make use of this Java Decompiler for Viewing the jar whether it has a Duplicate pom.xml and properties
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With