Interface NativeConfig.ResourcesConfig
- Enclosing interface:
NativeConfig
-
Method Summary
Modifier and TypeMethodDescriptionexcludes()Deprecated, for removal: This API element is subject to removal in a future version.Excluding resources is not supported in the new reachability-metadata.json file used with Mandrel/GraalVM 25.0 and onwards.includes()A comma separated list of globs to match resource paths that should be added to the native image.
-
Method Details
-
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.pngandsrc/main/resources/foo/selected.pngin your source tree and one of your dependency JARs containsbar/some.txtfile, with the following configurationquarkus.native.resources.includes = foo/**,bar/**/*.txt
the files
src/main/resources/foo/selected.pngandbar/some.txtwill be included in the native image, whilesrc/main/resources/ignored.pngwill 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.propertiesparser- 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
Deprecated, for removal: This API element is subject to removal in a future version.Excluding resources is not supported in the new reachability-metadata.json file used with Mandrel/GraalVM 25.0 and onwards. Quarkus plans to adopt the use of reachability-metadata.json for Mandrel/GraalVM 23.1 for JDK 21 as well (see https://github.com/quarkusio/quarkus/issues/41016)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.pngandsrc/main/resources/foo/green.pngin your source tree and one of your dependency JARs containsbar/blue.pngfile, with the following configurationquarkus.native.resources.includes = **/*.png quarkus.native.resources.excludes = foo/**,**/green.png
the resource
red.pngwill be available in the native image while the resourcesfoo/green.pngandbar/blue.pngwill not be available in the native image.
-