JMH does not handle signed JARs correctly
Aleksey Shipilev
aleksey.shipilev at oracle.com
Wed Aug 6 20:03:37 UTC 2014
On 08/06/2014 08:58 PM, Aleksey Shipilev wrote:
> 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.
Anyhow, pushing this to archetypes seems like a good idea:
http://hg.openjdk.java.net/code-tools/jmh/rev/9b2561a5e071
Thanks,
-Aleksey.
More information about the jmh-dev
mailing list