Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tightened regexps for -H:IncludeResources examples #3086

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions substratevm/Resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ my-app-root
```
Then:

* All resources can be loaded with `.*/Resource.*txt$`, specified as `{"pattern":".*/Resource.*txt$"}` in a configuration file, or `-H:IncludeResources='.*/Resource.*txt$'` on the command line.
* `Resource0.txt` can be loaded with `.*/Resource0.txt$`.
* `Resource0.txt` and `Resource1.txt` can be loaded with `.*/Resource0.txt$` and `.*/Resource1.txt$`
(or alternatively with a single `.*/(Resource0|Resource1).txt$`).
* Also, if we want to include everything except the `Resource2.txt` file, we can simply exclude it with `-H:IncludeResources='.*/Resource.*txt$'` followed by `-H:ExcludeResources='.*/Resource2.txt$'`.
* All resources can be loaded with `.*/Resource.+[.]txt$`, specified as `{"pattern":".*/Resource.+[.]txt$"}` in a configuration file, or `-H:IncludeResources='.*/Resource.+[.]txt$'` on the command line.
* `Resource0.txt` can be loaded with `.*/Resource0[.]txt$`.
* `Resource0.txt` and `Resource1.txt` can be loaded with `.*/Resource0[.]txt$` and `.*/Resource1[.]txt$`
(or alternatively with a single `.*/(Resource0|Resource1)[.]txt$`).
* Also, if we want to include everything except the `Resource2.txt` file, we can simply exclude it with `-H:IncludeResources='.*/Resource.*txt$'` followed by `-H:ExcludeResources='.*/Resource2[.]txt$'`.

See also the [guide on assisted configuration of Java resources and other dynamic features](BuildConfiguration.md#assisted-configuration-of-native-image-builds).

Expand Down