JMH does not handle signed JARs correctly
Aleksey Shipilev
aleksey.shipilev at oracle.com
Wed Aug 6 16:58:53 UTC 2014
Hi,
On 08/06/2014 08:08 PM, Dmitry Vyazelenko wrote:
> This is a known problem with maven-shade-plugin (see http://zhentao-li.blogspot.ch/2012/06/maven-shade-plugin-invalid-signature.html and http://stackoverflow.com/questions/999489/invalid-signature-file-when-attempting-to-run-a-jar).
> And the fix is to add the following to the plugin configuration:
> <configuration>
> <filters>
> <filter>
> <artifact>*:*</artifact>
> <excludes>
> <exclude>META-INF/*.SF</exclude>
> <exclude>META-INF/*.DSA</exclude>
> <exclude>META-INF/*.RSA</exclude>
> </excludes>
> </filter>
> </filters>
> </configuration>
We use to have these filters in sample projects, but purged since it was
confusing people. Do we need to resurrect it? It seems to be only the
corner case of signed JARs (Bouncy Castle seems to be the only example I
ever saw experiencing this), and the solution is easily googlable.
> Unrelated note, maven archetype for JMH uses old version 0.9.3 instead of current 0.9.5.
Known issue:
https://issues.sonatype.org/browse/MVNCENTRAL-482
-Aleksey.
More information about the jmh-dev
mailing list