Niels Basjes created MSHADE-439:
-----------------------------------
Summary: Relocate does not relocate the other JVM variants in
Multi Release jar.
Key: MSHADE-439
URL: https://issues.apache.org/jira/browse/MSHADE-439
Project: Maven Shade Plugin
Issue Type: Bug
Affects Versions: 3.4.1
Reporter: Niels Basjes
The 2.0 release of snakeyaml is a _Multi Release jar (See this
[commit|https://bitbucket.org/snakeyaml/snakeyaml/commits/b33f0ca7507fd61fc945722b5d14de4b0aff5262])_.
For 2 class files they actually package a *standard* and a *java 9* variant of
the same thing.
{code:java}
$ unzip -l ~/.m2/repository/org/yaml/snakeyaml/2.0/snakeyaml-2.0.jar | fgrep
Logger
1545 2023-02-26 11:06
META-INF/versions/9/org/yaml/snakeyaml/internal/Logger$Level.class
1365 2023-02-26 11:06
META-INF/versions/9/org/yaml/snakeyaml/internal/Logger.class
1446 2023-02-26 11:06 org/yaml/snakeyaml/internal/Logger$Level.class
1264 2023-02-26 11:06 org/yaml/snakeyaml/internal/Logger.class
{code}
When I use the maven-shade-plugin 3.4.1 (latest at the time of writing) to
shade this dependency in my project and relocate (!) it to a different package
the final jar contains this:
{code:java}
1678 2023-02-26 11:06
META-INF/versions/9/org/yaml/snakeyaml/internal/Logger$Level.class
1484 2023-02-26 11:06
META-INF/versions/9/org/yaml/snakeyaml/internal/Logger.class
1579 2023-02-26 11:06
nl/basjes/shaded/org/yaml/snakeyaml/internal/Logger$Level.class
1383 2023-02-26 11:06
nl/basjes/shaded/org/yaml/snakeyaml/internal/Logger.class
{code}
Note that the *standard* variants have been shaded correctly and the *java 9*
variants have not been relocated at all.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)