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. -
Method Summary
Modifier and TypeMethodDescriptionThe dependencies specified here are not used until they are referenced in a POM within the group.getLocation
(Object key) Gets the location of the specified field in 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.
-
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
-
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
-