melix / jmh-gradle-plugin

Integrates the JMH benchmarking framework with Gradle

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Composing fat jar using runtime dependencies is error prone in case of duplicate resources

reinhapa opened this issue · comments

@melix what was the reason to create a fat jar containing all runtime dependencies in the first place?

I have problems with dependencies, that will define specialized resources as META-INF/beans.xml or META-INF/services/xxx files, that exists in multiple dependencies and can have different content. This leads in my case to false behavior in case as there are multiple Java service definitions for the same interface/abstract class or CDI Bean definitions that in one artifact defines a different discovery mode than in an other artifact.

In case of JMH the solution is to add an Class-Path meta info attribute containing the runtime dependencies in oder to work around this problem. This could also mitigate the path length problem on a Windows installation too..

The following issues could maybe benefit of a reconciling this decision: