, , , .
pom, maven-shade-plugin
pom. , Maven , . , Maven transformer
.
To understand this, use mvn help:effective-pom
and find the resulting configuration maven-shade-plugin
. In my case, it <resource>
was added to ManifestResourceTransformer
, and this resource corresponded to the first entry in the parent pom configuration maven-shade-plugin
.
Adding <id>
to <execution>
fixes the problem:
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<id>shade-my-jar</id>
...
I suspect that both configurations used the same default identifier. Thus, the key is that each execution of the plugin has a unique identifier.
source
share