You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Expose the remote JDK's legal/ directory from the generated BUILD file #390
The BUILD file that rules_java generates for remote JDK repositories (toolchains/jdk_build_file.bzl, JDK_BUILD_TEMPLATE) exposes the runtime's bin, conf, lib, include and jmods through filegroups, and exports only WORKSPACE and BUILD.bazel. The archive's legal/ directory is downloaded but not reachable from any target.
Projects that package the remote JDK into a container image and redistribute it need those files: OpenJDK is GPL-2.0 with the Classpath Exception and bundles third-party components whose licenses require their notices to accompany copies. Today the only way to get them is to patch JDK_BUILD_TEMPLATE.
Would you accept exporting them, for example a legal filegroup (glob(["legal/**"], allow_empty = True)) or adding legal/** to exports_files? Observed with rules_java 9.3.0 and remotejdk21_linux. Happy to send a PR.
Activity
hvadehra commentedon Oct 26, 2026
This SGTM, please send a PR.