Class NativeImageResourceBuildItem
java.lang.Object
io.quarkus.builder.item.BuildItem
io.quarkus.builder.item.MultiBuildItem
io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem
A build item that indicates that a static resource should be included in the native image.
A static resource is a file that is not processed by the build steps, but is included in the native image as-is.
The resource path passed to the constructor is a /-separated path name (with the same semantics as the parameters)
passed to ClassLoader.getResources(String).
Related build items:
- Use
NativeImageResourceDirectoryBuildItemif you need to add a directory of resources - Use
NativeImageResourcePatternsBuildItemto select resource paths by regular expressions or globs
-
Constructor Summary
ConstructorsConstructorDescriptionNativeImageResourceBuildItem(String... resources) NativeImageResourceBuildItem(List<String> resources) -
Method Summary
Modifier and TypeMethodDescriptionstatic NativeImageResourceBuildItemofDependencyResources(Collection<io.quarkus.maven.dependency.ResolvedDependency> dependencies, io.quarkus.maven.dependency.ArtifactCoords artifactCoordinates, io.quarkus.paths.PathFilter resourceFilter) Builds aNativeImageResourceBuildItemfor the given artifact and path
-
Constructor Details
-
NativeImageResourceBuildItem
-
NativeImageResourceBuildItem
-
-
Method Details
-
ofDependencyResources
public static NativeImageResourceBuildItem ofDependencyResources(Collection<io.quarkus.maven.dependency.ResolvedDependency> dependencies, io.quarkus.maven.dependency.ArtifactCoords artifactCoordinates, io.quarkus.paths.PathFilter resourceFilter) Builds aNativeImageResourceBuildItemfor the given artifact and path- Parameters:
dependencies- the resolved dependencies of the buildartifactCoordinates- the coordinates of the artifact containing the resourcesresourceFilter- the filter for the resources in glob syntax (seeGlobUtil)- Returns:
-
getResources
-