-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Filter module-info.class from entitlements-bridge jar in distribution #124580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Pinging @elastic/es-core-infra (Team:Core/Infra) |
|
Pinging @elastic/es-delivery (Team:Delivery) |
rjernst
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
| // Register artifact transform for filtering entitlements-bridge jar | ||
| FilteringJarTransform.registerTransform(dependencies) { spec -> | ||
| spec.exclude('module-info.class') | ||
| spec.exclude('META-INF/versions/**') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you also add a second line for spec.exclude('META-INF/versions') will that remove the directory too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope. I tried. It seems PathMatcher doesn't handle directories that way.
💔 Backport failed
You can use sqren/backport to manually backport by running |
…elastic#124580) (cherry picked from commit 74ccd4d) # Conflicts: # distribution/build.gradle
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
…elastic#124580) (cherry picked from commit 74ccd4d) # Conflicts: # distribution/build.gradle
The entitlement bridge jar is patched into java.base at runtime. At build time it is modular, so it contains a module-info.java. Yet at runtime this produces a warning from the jdk because the module info is ignored. We should remove the module info from the jar we put in the distribution to avoid the warning.
This is implemented as a Gradle artifact transform for a few reasons:
Jartasks on the producer side which have to be kept in sync.