Class ConfigurationContainer

java.lang.Object
org.apache.maven.api.model.ConfigurationContainer
All Implemented Interfaces:
Serializable, InputLocationTracker
Direct Known Subclasses:
Plugin, PluginExecution, ReportPlugin, ReportSet

@Experimental @Generated @ThreadSafe @Immutable public class ConfigurationContainer extends Object implements Serializable, InputLocationTracker
Contains the configuration information of the container like Plugin.
See Also:
  • Method Details

    • getInherited

      public String getInherited()
      Whether any configuration should be propagated to child POMs. Note: While the type of this field is String for technical reasons, the semantic type is actually Boolean. Default value is true.
      Returns:
      a String
    • getConfiguration

      public XmlNode getConfiguration()

      The configuration as DOM object.

      By default, every element content is trimmed, but starting with Maven 3.1.0, you can add xml:space="preserve" to elements you want to preserve whitespace.

      You can control how child POMs inherit configuration from parent POMs by adding combine.children or combine.self attributes to the children of the configuration element:

      • combine.children: available values are merge (default) and append,
      • combine.self: available values are merge (default) and override.

      See POM Reference documentation and Xpp3DomUtils for more information.

      Returns:
      a XmlNode
    • getLocation

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

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

      @Nonnull public ConfigurationContainer withInherited(String inherited)
      Creates a new ConfigurationContainer instance using the specified inherited.
      Parameters:
      inherited - the new String to use
      Returns:
      a ConfigurationContainer with the specified inherited
    • withConfiguration

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

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

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

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

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

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

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

      public boolean isInherited()