SNOW-905110: META-INF/versions entires are not relocated
Closed this issue ยท 7 comments
After #1382, the classes in META-INF/versions
are no longer relocated to the shaded location.
This can be dangerous for consumers that depend on these bouncycastle JARs, since the versions bundled in snowflake-jdbc
may be loaded instead, which can lead to runtime failures if consumers are using a newer version of bouncycastle
.
There are two issues with #1382:
- The
sortpom
plugin was added and configured with asortPlugins
element that reordered the plugins. Maven plugins are applied in the order in which they are declared. This caused themaven-antrun-plugin
(which performs the relocations) to be applied before themaven-shade-plugin
. - The
move
elements were removed from themaven-antrun-plugin
. Without this,META-INF/versions
will contain both the original and relocated classes.
Thanks @pkoenig10 for submitting the PR. We will review it internally and provide feedback.
I just noticed some compilation errors with Jackson being built against Java 17/19 for similar reasons, would it be possible to fix those issues alongside with a similar solution?
Yes, in snowflake-jdbc 3.14.2 -> 3.14.3 there were more META-INF entries added for Jackson that aren't correctly shaded. My CI shows the diff:
@sfc-gh-spanaite are you able to review the PR and provide feedback?
Just found this issue after having to skip/close another upgrade PR (3.14.5 released yesterday) because of this issue.
The fix was released in 3.15.0
Yes this seems to be corrected now in 3.15.0
Thank you!