Skip to content
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

Auto-inclusion of the JDK jmods directory in jlink module path #212

Open
HGuillemet opened this issue Mar 16, 2022 · 0 comments
Open

Auto-inclusion of the JDK jmods directory in jlink module path #212

HGuillemet opened this issue Mar 16, 2022 · 0 comments

Comments

@HGuillemet
Copy link

I noticed that the plugin systematically adds $JAVA_HOME/jmods to the jlink module path.
This prevents users to make use of the ALL-MODULE-PATH special value for --add-modules, since the whole JDK
will end up in the image runtime if they do.
This special value is useful for situations where the list of required modules is partially determined by the Gradle dependency management and not only from module descriptors.
See this discussion for instance. Applications using service providers may also benefit from this special value.

Since Java 10, jlink automatically adds the jmods directory to the module path if java.base is not already included, and, if I understand well, ALL-MODULE-PATH won't include all the jmods in this case. The plugin could rely on this behaviour and drop tha auto-inclusion of $JAVA_HOME/jmods .

What do you think about it ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant