public static class NativeConfig.ResourcesConfig extends Object
| Modifier and Type | Field and Description |
|---|---|
Optional<List<String>> |
includes
A comma separated list of globs to match resource paths that should be added to the native image.
|
| Constructor and Description |
|---|
ResourcesConfig() |
@ConfigItem public Optional<List<String>> includes
Use slash (/) as a path separator on all platforms. Globs must not start with slash.
By default, no resources are included.
Example: Given that you have src/main/resources/ignored.png
and src/main/resources/foo/selected.png in your source tree and one of your dependency JARs contains
bar/some.txt file, with the following configuration
quarkus.native.resources.includes = foo/**,bar/**/*.txtthe files
src/main/resources/foo/selected.png and bar/some.txt will be included in the native
image, while src/main/resources/ignored.png will not be included.
| Feature | Description |
|---|---|
* |
Matches a (possibly empty) sequence of characters that does not contain slash (/) |
** |
Matches a (possibly empty) sequence of characters that may contain slash (/) |
? |
Matches one character, but not slash |
[abc] |
Matches one character given in the bracket, but not slash |
[a-z] |
Matches one character from the range given in the bracket, but not slash |
[!abc] |
Matches one character not named in the bracket; does not match slash |
[a-z] |
Matches one character outside the range given in the bracket; does not match slash |
{one,two,three} |
Matches any of the alternating tokens separated by comma; the tokens may contain wildcards, nested alternations and ranges |
\ |
The escape character |
Note that there are three levels of escaping when passing this option via application.properties:
application.properties parser\) as the escaping character. So you need to use an appropriate
number of backslashes depending on which level you want to escape.
Note that Quarkus extensions typically include the resources they require by themselves. This option is useful in situations when the built-in functionality is not sufficient.
Copyright © 2020 JBoss by Red Hat. All rights reserved.