Package org.apache.maven.api.model
Class DependencyManagement
java.lang.Object
org.apache.maven.api.model.DependencyManagement
- All Implemented Interfaces:
Serializable
,InputLocationTracker
@Experimental
@Generated
@ThreadSafe
@Immutable
public class DependencyManagement
extends Object
implements Serializable, InputLocationTracker
Section for management of default dependency information for use in a group of
POMs.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Builder class used to create DependencyManagement instances. -
Constructor Summary
ModifierConstructorDescriptionprotected
Constructor for this class, to be called from its subclasses andDependencyManagement.Builder
. -
Method Summary
Modifier and TypeMethodDescriptionThe dependencies specified here are not used until they are referenced in a POM within the group.Gets the input location that caused this model to be read.getLocation
(Object key) Gets the location of the specified field in the input source.Gets the keys of the locations of the input source.static DependencyManagement.Builder
Creates a newDependencyManagement
builder instance.static DependencyManagement.Builder
newBuilder
(boolean withDefaults) Creates a newDependencyManagement
builder instance using default values or not.static DependencyManagement.Builder
Creates a newDependencyManagement
builder instance using the specified object as a basis.static DependencyManagement.Builder
newBuilder
(DependencyManagement from, boolean forceCopy) Creates a newDependencyManagement
builder instance using the specified object as a basis.static DependencyManagement
Creates a newDependencyManagement
instance.static DependencyManagement
newInstance
(boolean withDefaults) Creates a newDependencyManagement
instance using default values or not.with()
Creates a new builder with this object as the basis.withDependencies
(Collection<Dependency> dependencies) Creates a newDependencyManagement
instance using the specified dependencies.
-
Constructor Details
-
DependencyManagement
Constructor for this class, to be called from its subclasses andDependencyManagement.Builder
.- See Also:
-
-
Method Details
-
getDependencies
The dependencies specified here are not used until they are referenced in a POM within the group. This allows the specification of a "standard" version for a particular dependency.- Returns:
- a
List<Dependency>
-
getLocation
Gets the location of the specified field in the input source.- Specified by:
getLocation
in interfaceInputLocationTracker
-
getLocationKeys
Gets the keys of the locations of the input source. -
getLocationKeyStream
-
getImportedFrom
Gets the input location that caused this model to be read.- Specified by:
getImportedFrom
in interfaceInputLocationTracker
- Returns:
- InputLocation
-
with
Creates a new builder with this object as the basis.- Returns:
- a
Builder
-
withDependencies
Creates a newDependencyManagement
instance using the specified dependencies.- Parameters:
dependencies
- the newCollection<Dependency>
to use- Returns:
- a
DependencyManagement
with the specified dependencies
-
newInstance
Creates a newDependencyManagement
instance. Equivalent tonewInstance(true)
.- Returns:
- a new
DependencyManagement
- See Also:
-
newInstance
Creates a newDependencyManagement
instance using default values or not. Equivalent tonewBuilder(withDefaults).build()
.- Parameters:
withDefaults
- the boolean indicating whether default values should be used- Returns:
- a new
DependencyManagement
-
newBuilder
Creates a newDependencyManagement
builder instance. Equivalent tonewBuilder(true)
.- Returns:
- a new
Builder
- See Also:
-
newBuilder
Creates a newDependencyManagement
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 newDependencyManagement
builder instance using the specified object as a basis. Equivalent tonewBuilder(from, false)
.- Parameters:
from
- theDependencyManagement
instance to use as a basis- Returns:
- a new
Builder
-
newBuilder
@Nonnull public static DependencyManagement.Builder newBuilder(DependencyManagement from, boolean forceCopy) Creates a newDependencyManagement
builder instance using the specified object as a basis.- Parameters:
from
- theDependencyManagement
instance to use as a basisforceCopy
- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-