Interface NativeConfig.ResourcesConfig
-
- Enclosing interface:
- NativeConfig
public static interface NativeConfig.ResourcesConfig
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<List<String>>
excludes()
A comma separated list of globs to match resource paths that should not be added to the native image.Optional<List<String>>
includes()
A comma separated list of globs to match resource paths that should be added to the native image.
-
-
-
Method Detail
-
includes
Optional<List<String>> includes()
A comma separated list of globs to match resource paths that should be added to the native image.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
andsrc/main/resources/foo/selected.png
in your source tree and one of your dependency JARs containsbar/some.txt
file, with the following configurationquarkus.native.resources.includes = foo/**,bar/**/*.txt
the filessrc/main/resources/foo/selected.png
andbar/some.txt
will be included in the native image, whilesrc/main/resources/ignored.png
will not be included.Supported glob features
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- MicroProfile Config list converter that splits the comma separated list
- Glob 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.
-
excludes
Optional<List<String>> excludes()
A comma separated list of globs to match resource paths that should not be added to the native image.Use slash (
/
) as a path separator on all platforms. Globs must not start with slash.Please refer to
includes()
for details about the glob syntax.By default, no resources are excluded.
Example: Given that you have
src/main/resources/red.png
andsrc/main/resources/foo/green.png
in your source tree and one of your dependency JARs containsbar/blue.png
file, with the following configurationquarkus.native.resources.includes = **/*.png quarkus.native.resources.excludes = foo/**,**/green.png
the resourcered.png
will be available in the native image while the resourcesfoo/green.png
andbar/blue.png
will not be available in the native image.
-
-