JMH does not handle signed JARs correctly
Dmitry Vyazelenko
vyazelenko at yahoo.com
Wed Aug 6 21:59:50 UTC 2014
Hi Aleksey,
Thanks! You are fast! ;-)
P.S. I’ve had problems with Bounty Castle, Eclipse compiler and Janino compiler. They
all sign JARs. In that particular project 5 JARs from these libraries were causing problem.
Best regards,
Dmitry Vyazelenko
On Aug 6, 2014, at 22:03 , Aleksey Shipilev <aleksey.shipilev at oracle.com> wrote:
> 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