Class NativeImageResourceBuildItem

java.lang.Object
io.quarkus.builder.item.BuildItem
io.quarkus.builder.item.MultiBuildItem
io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem

public final class NativeImageResourceBuildItem extends MultiBuildItem
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:

  • Constructor Details

    • NativeImageResourceBuildItem

      public NativeImageResourceBuildItem(String... resources)
    • NativeImageResourceBuildItem

      public NativeImageResourceBuildItem(List<String> resources)
  • 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 a NativeImageResourceBuildItem for the given artifact and path
      Parameters:
      dependencies - the resolved dependencies of the build
      artifactCoordinates - the coordinates of the artifact containing the resources
      resourceFilter - the filter for the resources in glob syntax (see GlobUtil)
      Returns:
    • getResources

      public List<String> getResources()