rules_java icon indicating copy to clipboard operation
rules_java copied to clipboard

Add jmods

Open Sineaggi opened this issue 2 years ago • 4 comments

The jmods is important for anybody attempting to use the jlink command with a custom --add-modules flag.

Sineaggi avatar Sep 27 '23 06:09 Sineaggi

@cushon What are your thoughts about this?

hvadehra avatar Oct 23 '23 07:10 hvadehra

Internally we defined a separate java_runtime target that includes the jmods for use-cases where they are needed. They aren't needed for most actions, and omitting them avoids shipping some extra inputs to those actions.

cushon avatar Oct 23 '23 15:10 cushon

Internally we defined a separate java_runtime target that includes the jmods for use-cases where they are needed. They aren't needed for most actions, and omitting them avoids shipping some extra inputs to those actions.

Would it make sense to have something similar in rules_java (a separate target), or to add this?

Sineaggi avatar Oct 24 '23 00:10 Sineaggi

Would it make sense to have something similar in rules_java (a separate target), or to add this?

That sounds reasonable.

@Sineaggi Could you please declare a separate java_runtime with the name jdk_with_jmods and add this new filegroup to the sources of that?

hvadehra avatar Nov 07 '23 07:11 hvadehra

Closing in favor of https://github.com/bazelbuild/rules_java/pull/184

hvadehra avatar May 07 '24 06:05 hvadehra

@hvadehra sorry this fell off my plate, I checked out https://github.com/bazelbuild/rules_java/pull/184 and it seems like that solves the issue for us. When can we expect a new release of rules_java containing that fix?

Sineaggi avatar May 07 '24 23:05 Sineaggi

When can we expect a new release of rules_java containing that fix

Hopefully soon, I opened https://github.com/bazelbuild/rules_java/issues/186 for now

hvadehra avatar May 08 '24 13:05 hvadehra