From f9ef5e0ac10968c87deab8c4bc447a6e9da2766e Mon Sep 17 00:00:00 2001 From: Betty Mann Date: Tue, 21 Oct 2025 15:59:11 +0200 Subject: [PATCH] Add regex for preserve option --- docs/reference-manual/native-image/BuildOptions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/reference-manual/native-image/BuildOptions.md b/docs/reference-manual/native-image/BuildOptions.md index b5bae13a8464..2b93a337b58d 100644 --- a/docs/reference-manual/native-image/BuildOptions.md +++ b/docs/reference-manual/native-image/BuildOptions.md @@ -141,9 +141,9 @@ GraalVM 25 introduces the `-H:Preserve` option. This lets you instruct the `nati You can use `-H:Preserve` in the following ways: * `-H:Preserve=all`: preserves all elements from the entire JDK and classpath. This creates larger images but ensures all code is included, which can help resolve missing metadata issues. -* `-H:Preserve=module=`: preserves all elements from a given module +* `-H:Preserve=module=`: preserves all elements from a given module. * `-H:Preserve=module=ALL-UNNAMED`: preserves all elements from the classpath (provided with `-cp`). -* `-H:Preserve=package=`: preserves all elements from a given package +* `-H:Preserve=package=`: preserves all elements from a given package. You can use `*` to include all subpackages, for example: `-H:Preserve=package=com.my.pkg.*,package=com.another.pkg.*`. Note that only the `*` wildcard is supported; other regex patterns are not allowed. * `-H:Preserve=path=`: preserves all elements from a given class-path entry * You can combine any of the previous uses by separating them with a comma (`,`). For example: `-H:Preserve=path=,module=,module=,package=`