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
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class used to create DependencyManagement instances. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructor 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.BuilderCreates a newDependencyManagementbuilder instance.static DependencyManagement.BuildernewBuilder(boolean withDefaults) Creates a newDependencyManagementbuilder instance using default values or not.static DependencyManagement.BuilderCreates a newDependencyManagementbuilder instance using the specified object as a basis.static DependencyManagement.BuildernewBuilder(DependencyManagement from, boolean forceCopy) Creates a newDependencyManagementbuilder instance using the specified object as a basis.static DependencyManagementCreates a newDependencyManagementinstance.static DependencyManagementnewInstance(boolean withDefaults) Creates a newDependencyManagementinstance using default values or not.with()Creates a new builder with this object as the basis.withDependencies(Collection<Dependency> dependencies) Creates a newDependencyManagementinstance 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:
getLocationin 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:
getImportedFromin interfaceInputLocationTracker- Returns:
- InputLocation
-
with
Creates a new builder with this object as the basis.- Returns:
- a
Builder
-
withDependencies
Creates a newDependencyManagementinstance using the specified dependencies.- Parameters:
dependencies- the newCollection<Dependency>to use- Returns:
- a
DependencyManagementwith the specified dependencies
-
newInstance
Creates a newDependencyManagementinstance. Equivalent tonewInstance(true).- Returns:
- a new
DependencyManagement - See Also:
-
newInstance
Creates a newDependencyManagementinstance 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 newDependencyManagementbuilder instance. Equivalent tonewBuilder(true).- Returns:
- a new
Builder - See Also:
-
newBuilder
Creates a newDependencyManagementbuilder instance using default values or not.- Parameters:
withDefaults- the boolean indicating whether default values should be used- Returns:
- a new
Builder
-
newBuilder
Creates a newDependencyManagementbuilder instance using the specified object as a basis. Equivalent tonewBuilder(from, false).- Parameters:
from- theDependencyManagementinstance to use as a basis- Returns:
- a new
Builder
-
newBuilder
@Nonnull public static DependencyManagement.Builder newBuilder(DependencyManagement from, boolean forceCopy) Creates a newDependencyManagementbuilder instance using the specified object as a basis.- Parameters:
from- theDependencyManagementinstance to use as a basisforceCopy- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-