Package org.apache.maven.api.model
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:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Builder class used to create ConfigurationContainer instances. -
Method Summary
Modifier and TypeMethodDescriptionThe configuration as DOM object.Whether any configuration should be propagated to child POMs.getLocation
(Object key) Gets the location of the specified field in the input source.boolean
Creates a newConfigurationContainer
builder instance.newBuilder
(boolean withDefaults) Creates a newConfigurationContainer
builder instance using default values or not.Creates a newConfigurationContainer
builder instance using the specified object as a basis.newBuilder
(ConfigurationContainer from, boolean forceCopy) Creates a newConfigurationContainer
builder instance using the specified object as a basis.static ConfigurationContainer
Creates a newConfigurationContainer
instance.static ConfigurationContainer
newInstance
(boolean withDefaults) Creates a newConfigurationContainer
instance using default values or not.with()
Creates a new builder with this object as the basis.withConfiguration
(XmlNode configuration) Creates a newConfigurationContainer
instance using the specified configuration.withInherited
(String inherited) Creates a newConfigurationContainer
instance using the specified inherited.
-
Method Details
-
getInherited
Whether any configuration should be propagated to child POMs. Note: While the type of this field isString
for technical reasons, the semantic type is actuallyBoolean
. Default value istrue
.- Returns:
- a
String
-
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
orcombine.self
attributes to the children of the configuration element:combine.children
: available values aremerge
(default) andappend
,combine.self
: available values aremerge
(default) andoverride
.
- Returns:
- a
XmlNode
- See Also:
-
getLocation
Gets the location of the specified field in the input source.- Specified by:
getLocation
in interfaceInputLocationTracker
-
with
Creates a new builder with this object as the basis.- Returns:
- a
Builder
-
withInherited
Creates a newConfigurationContainer
instance using the specified inherited.- Parameters:
inherited
- the newString
to use- Returns:
- a
ConfigurationContainer
with the specified inherited
-
withConfiguration
Creates a newConfigurationContainer
instance using the specified configuration.- Parameters:
configuration
- the newXmlNode
to use- Returns:
- a
ConfigurationContainer
with the specified configuration
-
newInstance
Creates a newConfigurationContainer
instance. Equivalent tonewInstance(true)
.- Returns:
- a new
ConfigurationContainer
- See Also:
-
newInstance
Creates a newConfigurationContainer
instance using default values or not. Equivalent tonewBuilder(withDefaults).build()
.- Parameters:
withDefaults
- the boolean indicating whether default values should be used- Returns:
- a new
ConfigurationContainer
-
newBuilder
Creates a newConfigurationContainer
builder instance. Equivalent tonewBuilder(true)
.- Returns:
- a new
Builder
- See Also:
-
newBuilder
Creates a newConfigurationContainer
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 newConfigurationContainer
builder instance using the specified object as a basis. Equivalent tonewBuilder(from, false)
.- Parameters:
from
- theConfigurationContainer
instance to use as a basis- Returns:
- a new
Builder
-
newBuilder
@Nonnull public static ConfigurationContainer.Builder newBuilder(ConfigurationContainer from, boolean forceCopy) Creates a newConfigurationContainer
builder instance using the specified object as a basis.- Parameters:
from
- theConfigurationContainer
instance to use as a basisforceCopy
- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-
isInherited
public boolean isInherited()
-