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 ?
I noticed that the plugin systematically adds
$JAVA_HOME/jmodsto the jlink module path.This prevents users to make use of the
ALL-MODULE-PATHspecial value for--add-modules, since the whole JDKwill 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
jmodsdirectory to the module path ifjava.baseis not already included, and, if I understand well,ALL-MODULE-PATHwon'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 ?