Skip to content

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

Description

@HGuillemet

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 ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions