Conversation
|
This is an unusual plugin and not intuitive to specify "--copy-files" without a value. So if it does move forward as is then we should seek out a better name. At a high-level, the jlink tool produces a run-time image from a set modules. The desire here seems to be to overlay, or copy, files that aren't part of any module into the run-time image. If this replaces files that are in a module then it suggests the need for a jlink --patch-module option, something that hasn't been needed to date. Another part seems to be the desire to persist the list of files that are copied so that it can be used again when the resulting run-time image is used to stamp out another run-time image. So I think the main question is whether adding this feature make sense or not. If it doesn't make sense then how hard would be for these other files to be packaged into a module so that they can participate in the normal jlink process? Is it mostly that libjvmcicompiler.so is huge and retaining the packaged modules double the space? As regards the details then ${java.home}/conf/jlink.copyfiles feels like an attractive nuisance. Maybe this could be resource that is generated at link time into a resource (like jdk/internal/vm/options) so it can't be edited. Could the initial copy be explicit so that it is clear from the initial jlink command what is going on? By this I mean, could the list of files to copy be specified to the option with something like this: |
How about
For completeness, this is the workflow we want when building GraalVM:
|
Javadoc for
CopyFilesPlugin:For GraalVM, this means on linux, we'd generate
conf/jlink.copyfilesto contain:It could also be used to copy across everything in the
language/directory if we wanted.