I\'m working on a maven project. I\'m trying to integrate jmh benchmarking into my project. The pom.xml of my maven project...
Found a cause of this affecting my own setup and am sharing here in case it helps others.
In my case, the cause is a parent pom containing the maven-shade-plugin
configuration as well as my own pom. The way that Maven merges these works out incorrectly. It appears the Maven is matching the transformer
tags in the order they appear and merging them.
To figure this out, use mvn help:effective-pom
and look for the resulting maven-shade-plugin
configuration. In my case, a
tag was added to the ManifestResourceTransformer
, and this resource matched the first entry in the parent pom's maven-shade-plugin
configuration.
Adding an
to the
eliminates the problem:
org.apache.maven.plugins
maven-shade-plugin
shade-my-jar
...
I suspect both configurations were using the same, default ID. So the key is that each execution of the plugin have a unique id.