[GR-60421] Implement package-wildcards for LayerCreate package suboption. #10756
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the ability to specify LayerCreate package inclusion request also with wildcards.
E.g.
-H:LayerCreate=custom.nil,module=java.base,package=io.netty.*
will create a base layer that contains classes from all packages that start withio.netty.
. I.e. if netty is on the class-path the following packages will be included:The
LayerCreate
now accepts a redirection file. This is handy for configurations with many suboptions. E.g instead of using-H:LayerCreate=base-layer.nil,module=java.base,package=io.micronaut.*,package=io.netty.*,package=jakarta.*,package=com.fasterxml.jackson.*,package=org.slf4j.*,package=reactor.*,package=org.reactivestreams.*
one can now use-H:LayerCreate=@layer-create.args
with alayer-create.args
files that contains:if the
LayerCreate
option is specified in anative-image.properties
file.Additionally the error reporting for
LayerCreate
suboptionspackage=<pn>,module=<mn>,path=<cp-entry>
is much improved and actionable. E.g. requesting invalid packages withpackage=nothere',package=alsonotthere
results in: