Class CapabilityBuildItem


public final class CapabilityBuildItem extends MultiBuildItem
Represents a technical capability that can be queried by other extensions.

Build steps can inject Capabilities - a convenient build item that holds the set of registered capabilities.

An extension may provide multiple capabilities. But only a single provider of a given capability is allowed in an application. If multiple providers of the same capability are detected during the build of an application, the build will fail with the corresponding error message. By default, capabilities are not displayed to users.

Capabilities should follow the naming conventions of Java packages; e.g. io.quarkus.security.jpa. Capabilities provided by core extensions should be listed in the Capability interface and their name should always start with the io.quarkus prefix.

See Also:
  • Constructor Details

    • CapabilityBuildItem

      @Deprecated public CapabilityBuildItem(String name)
      Deprecated.
      in favor of {@link #CapabilityBuildItem(String, String))} that also accepts the provider of the capability to be highlighted in the error messages in case of detected capability conflicts.
      Parameters:
      name - capability name
    • CapabilityBuildItem

      public CapabilityBuildItem(String name, String provider)
      IMPORTANT: in most cases, capability build items should not be produced by build steps of specific extensions but be configured in their extension descriptors instead. Capabilities produced from extension build steps aren't available for the Quarkus dev tools. As a consequence, such capabilities can not be taken into account when analyzing extension compatibility during project creation or when adding new extensions to a project.
      Parameters:
      name - capability name
      provider - capability provider
  • Method Details

    • getName

      public String getName()
    • getProvider

      public String getProvider()