Class PluginDescriptor

java.lang.Object
org.apache.maven.api.plugin.descriptor.PluginDescriptor
All Implemented Interfaces:
Serializable

@Experimental @Generated @ThreadSafe @Immutable public class PluginDescriptor extends Object implements Serializable
Root element of the plugin.xml file.
See Also:
  • Method Details

    • getNamespaceUri

      public String getNamespaceUri()
    • getModelEncoding

      public String getModelEncoding()
    • getName

      public String getName()
      Name of the plugin.
      Returns:
      a String
    • getDescription

      public String getDescription()
      Description of the plugin.
      Returns:
      a String
    • getGroupId

      public String getGroupId()
      The group id of the plugin.
      Returns:
      a String
    • getArtifactId

      public String getArtifactId()
      The artifact id of the plugin.
      Returns:
      a String
    • getVersion

      public String getVersion()
      The version of the plugin.
      Returns:
      a String
    • getGoalPrefix

      public String getGoalPrefix()
      Returns:
      a String
    • isIsolatedRealm

      public boolean isIsolatedRealm()
      Returns:
      a boolean
    • isInheritedByDefault

      public boolean isInheritedByDefault()
      Returns:
      a boolean
    • getRequiredJavaVersion

      public String getRequiredJavaVersion()
      A version range which specifies the supported Java versions. A version range can either use the usual mathematical syntax "[2.0.10,2.1.0),[3.0,)" or use a single version "2.2.1". The latter is a short form for "[2.2.1,)", i.e. denotes the minimum version required.
      Returns:
      a String
    • getRequiredMavenVersion

      public String getRequiredMavenVersion()
      A version range which specifies the supported Maven versions. A version range can either use the usual mathematical syntax "[2.0.10,2.1.0),[3.0,)" or use a single version "2.2.1". The latter is a short form for "[2.2.1,)", i.e. denotes the minimum version required. This value takes precedence over the POMs Maven prerequisite.
      Returns:
      a String
    • getMojos

      @Nonnull public List<MojoDescriptor> getMojos()
      Description of each Mojo provided by the plugin.
      Returns:
      a List<MojoDescriptor>
    • with

      Creates a new builder with this object as the basis.
      Returns:
      a Builder
    • withName

      @Nonnull public PluginDescriptor withName(String name)
      Creates a new PluginDescriptor instance using the specified name.
      Parameters:
      name - the new String to use
      Returns:
      a PluginDescriptor with the specified name
    • withDescription

      @Nonnull public PluginDescriptor withDescription(String description)
      Creates a new PluginDescriptor instance using the specified description.
      Parameters:
      description - the new String to use
      Returns:
      a PluginDescriptor with the specified description
    • withGroupId

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

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

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

      @Nonnull public PluginDescriptor withGoalPrefix(String goalPrefix)
      Creates a new PluginDescriptor instance using the specified goalPrefix.
      Parameters:
      goalPrefix - the new String to use
      Returns:
      a PluginDescriptor with the specified goalPrefix
    • withIsolatedRealm

      @Nonnull public PluginDescriptor withIsolatedRealm(boolean isolatedRealm)
      Creates a new PluginDescriptor instance using the specified isolatedRealm.
      Parameters:
      isolatedRealm - the new boolean to use
      Returns:
      a PluginDescriptor with the specified isolatedRealm
    • withInheritedByDefault

      @Nonnull public PluginDescriptor withInheritedByDefault(boolean inheritedByDefault)
      Creates a new PluginDescriptor instance using the specified inheritedByDefault.
      Parameters:
      inheritedByDefault - the new boolean to use
      Returns:
      a PluginDescriptor with the specified inheritedByDefault
    • withRequiredJavaVersion

      @Nonnull public PluginDescriptor withRequiredJavaVersion(String requiredJavaVersion)
      Creates a new PluginDescriptor instance using the specified requiredJavaVersion.
      Parameters:
      requiredJavaVersion - the new String to use
      Returns:
      a PluginDescriptor with the specified requiredJavaVersion
    • withRequiredMavenVersion

      @Nonnull public PluginDescriptor withRequiredMavenVersion(String requiredMavenVersion)
      Creates a new PluginDescriptor instance using the specified requiredMavenVersion.
      Parameters:
      requiredMavenVersion - the new String to use
      Returns:
      a PluginDescriptor with the specified requiredMavenVersion
    • withMojos

      Creates a new PluginDescriptor instance using the specified mojos.
      Parameters:
      mojos - the new Collection<MojoDescriptor> to use
      Returns:
      a PluginDescriptor with the specified mojos
    • newInstance

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

      @Nonnull public static PluginDescriptor newInstance(boolean withDefaults)
      Creates a new PluginDescriptor 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 PluginDescriptor
    • newBuilder

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

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

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

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

      public String getPluginLookupKey()
    • getId

      public String getId()