Class Dependency
java.lang.Object
org.apache.maven.api.plugin.descriptor.Dependency
- All Implemented Interfaces:
Serializable
@Experimental
@Generated
@ThreadSafe
@Immutable
public class Dependency
extends Object
implements Serializable
Definition of a dependency, needed by the plugin at runtime.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class used to create Dependency instances. -
Method Summary
Modifier and TypeMethodDescriptionThe artifact id of the dependency.The group id of the dependency.getType()The type of dependency.The version of the dependency.static Dependency.BuilderCreates a newDependencybuilder instance.static Dependency.BuildernewBuilder(boolean withDefaults) Creates a newDependencybuilder instance using default values or not.static Dependency.BuildernewBuilder(Dependency from) Creates a newDependencybuilder instance using the specified object as a basis.static Dependency.BuildernewBuilder(Dependency from, boolean forceCopy) Creates a newDependencybuilder instance using the specified object as a basis.static DependencyCreates a newDependencyinstance.static DependencynewInstance(boolean withDefaults) Creates a newDependencyinstance using default values or not.with()Creates a new builder with this object as the basis.withArtifactId(String artifactId) Creates a newDependencyinstance using the specified artifactId.withGroupId(String groupId) Creates a newDependencyinstance using the specified groupId.Creates a newDependencyinstance using the specified type.withVersion(String version) Creates a newDependencyinstance using the specified version.
-
Method Details
-
getGroupId
The group id of the dependency.- Returns:
- a
String
-
getArtifactId
The artifact id of the dependency.- Returns:
- a
String
-
getVersion
The version of the dependency.- Returns:
- a
String
-
getType
The type of dependency.- Returns:
- a
String
-
with
Creates a new builder with this object as the basis.- Returns:
- a
Builder
-
withGroupId
Creates a newDependencyinstance using the specified groupId.- Parameters:
groupId- the newStringto use- Returns:
- a
Dependencywith the specified groupId
-
withArtifactId
Creates a newDependencyinstance using the specified artifactId.- Parameters:
artifactId- the newStringto use- Returns:
- a
Dependencywith the specified artifactId
-
withVersion
Creates a newDependencyinstance using the specified version.- Parameters:
version- the newStringto use- Returns:
- a
Dependencywith the specified version
-
withType
Creates a newDependencyinstance using the specified type.- Parameters:
type- the newStringto use- Returns:
- a
Dependencywith the specified type
-
newInstance
Creates a newDependencyinstance. Equivalent tonewInstance(true).- Returns:
- a new
Dependency - See Also:
-
newInstance
Creates a newDependencyinstance using default values or not. Equivalent tonewBuilder(withDefaults).build().- Parameters:
withDefaults- the boolean indicating whether default values should be used- Returns:
- a new
Dependency
-
newBuilder
Creates a newDependencybuilder instance. Equivalent tonewBuilder(true).- Returns:
- a new
Builder - See Also:
-
newBuilder
Creates a newDependencybuilder instance using default values or not.- Parameters:
withDefaults- the boolean indicating whether default values should be used- Returns:
- a new
Builder
-
newBuilder
Creates a newDependencybuilder instance using the specified object as a basis. Equivalent tonewBuilder(from, false).- Parameters:
from- theDependencyinstance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newDependencybuilder instance using the specified object as a basis.- Parameters:
from- theDependencyinstance to use as a basisforceCopy- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-