Class Extension

java.lang.Object
org.apache.maven.api.model.Extension
All Implemented Interfaces:
Serializable, InputLocationTracker

Describes a build extension to utilise.
See Also:
  • Constructor Details Link icon

  • Method Details Link icon

    • getGroupId Link icon

      public String getGroupId()
      The group ID of the extension's artifact.
      Returns:
      a String
    • getArtifactId Link icon

      public String getArtifactId()
      The artifact ID of the extension.
      Returns:
      a String
    • getVersion Link icon

      public String getVersion()
      The version of the extension.
      Returns:
      a String
    • getConfiguration Link icon

      public XmlNode getConfiguration()
      The configuration of the extension.
      Returns:
      a XmlNode
      Since:
      Maven 4.0.0
    • getLocation Link icon

      public InputLocation getLocation(Object key)
      Gets the location of the specified field in the input source.
      Specified by:
      getLocation in interface InputLocationTracker
    • getLocationKeys Link icon

      public Set<Object> getLocationKeys()
      Gets the keys of the locations of the input source.
    • getLocationKeyStream Link icon

      protected Stream<Object> getLocationKeyStream()
    • getImportedFrom Link icon

      public InputLocation getImportedFrom()
      Gets the input location that caused this model to be read.
      Specified by:
      getImportedFrom in interface InputLocationTracker
      Returns:
      InputLocation
    • with Link icon

      @Nonnull public Extension.Builder with()
      Creates a new builder with this object as the basis.
      Returns:
      a Builder
    • withGroupId Link icon

      @Nonnull public Extension withGroupId(String groupId)
      Creates a new Extension instance using the specified groupId.
      Parameters:
      groupId - the new String to use
      Returns:
      a Extension with the specified groupId
    • withArtifactId Link icon

      @Nonnull public Extension withArtifactId(String artifactId)
      Creates a new Extension instance using the specified artifactId.
      Parameters:
      artifactId - the new String to use
      Returns:
      a Extension with the specified artifactId
    • withVersion Link icon

      @Nonnull public Extension withVersion(String version)
      Creates a new Extension instance using the specified version.
      Parameters:
      version - the new String to use
      Returns:
      a Extension with the specified version
    • withConfiguration Link icon

      @Nonnull public Extension withConfiguration(XmlNode configuration)
      Creates a new Extension instance using the specified configuration.
      Parameters:
      configuration - the new XmlNode to use
      Returns:
      a Extension with the specified configuration
    • newInstance Link icon

      @Nonnull public static Extension newInstance()
      Creates a new Extension instance. Equivalent to newInstance(true).
      Returns:
      a new Extension
      See Also:
    • newInstance Link icon

      @Nonnull public static Extension newInstance(boolean withDefaults)
      Creates a new Extension instance using default values or not. Equivalent to newBuilder(withDefaults).build().
      Parameters:
      withDefaults - the boolean indicating whether default values should be used
      Returns:
      a new Extension
    • newBuilder Link icon

      @Nonnull public static Extension.Builder newBuilder()
      Creates a new Extension builder instance. Equivalent to newBuilder(true).
      Returns:
      a new Builder
      See Also:
    • newBuilder Link icon

      @Nonnull public static Extension.Builder newBuilder(boolean withDefaults)
      Creates a new Extension builder instance using default values or not.
      Parameters:
      withDefaults - the boolean indicating whether default values should be used
      Returns:
      a new Builder
    • newBuilder Link icon

      @Nonnull public static Extension.Builder newBuilder(Extension from)
      Creates a new Extension builder instance using the specified object as a basis. Equivalent to newBuilder(from, false).
      Parameters:
      from - the Extension instance to use as a basis
      Returns:
      a new Builder
    • newBuilder Link icon

      @Nonnull public static Extension.Builder newBuilder(Extension from, boolean forceCopy)
      Creates a new Extension builder instance using the specified object as a basis.
      Parameters:
      from - the Extension instance to use as a basis
      forceCopy - the boolean indicating if a copy should be forced
      Returns:
      a new Builder
    • equals Link icon

      public boolean equals(Object o)
      Overrides:
      equals in class Object
      See Also:
    • hashCode Link icon

      public int hashCode()
      Overrides:
      hashCode in class Object
      See Also: