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 SummaryNested ClassesModifier and TypeClassDescriptionstatic classBuilder class used to create Dependency instances.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedDependency(Dependency.Builder builder) Constructor for this class, to be called from its subclasses andDependency.Builder.
- 
Method SummaryModifier 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.
- 
Constructor Details- 
DependencyConstructor for this class, to be called from its subclasses andDependency.Builder.- See Also:
 
 
- 
- 
Method Details- 
getGroupIdThe group id of the dependency.- Returns:
- a String
 
- 
getArtifactIdThe artifact id of the dependency.- Returns:
- a String
 
- 
getVersionThe version of the dependency.- Returns:
- a String
 
- 
getTypeThe type of dependency.- Returns:
- a String
 
- 
withCreates a new builder with this object as the basis.- Returns:
- a Builder
 
- 
withGroupIdCreates a newDependencyinstance using the specified groupId.- Parameters:
- groupId- the new- Stringto use
- Returns:
- a Dependencywith the specified groupId
 
- 
withArtifactIdCreates a newDependencyinstance using the specified artifactId.- Parameters:
- artifactId- the new- Stringto use
- Returns:
- a Dependencywith the specified artifactId
 
- 
withVersionCreates a newDependencyinstance using the specified version.- Parameters:
- version- the new- Stringto use
- Returns:
- a Dependencywith the specified version
 
- 
withTypeCreates a newDependencyinstance using the specified type.- Parameters:
- type- the new- Stringto use
- Returns:
- a Dependencywith the specified type
 
- 
newInstanceCreates a newDependencyinstance. Equivalent tonewInstance(true).- Returns:
- a new Dependency
- See Also:
 
- 
newInstanceCreates 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
 
- 
newBuilderCreates a newDependencybuilder instance. Equivalent tonewBuilder(true).- Returns:
- a new Builder
- See Also:
 
- 
newBuilderCreates a newDependencybuilder instance using default values or not.- Parameters:
- withDefaults- the boolean indicating whether default values should be used
- Returns:
- a new Builder
 
- 
newBuilderCreates a newDependencybuilder instance using the specified object as a basis. Equivalent tonewBuilder(from, false).- Parameters:
- from- the- Dependencyinstance to use as a basis
- Returns:
- a new Builder
 
- 
newBuilderCreates a newDependencybuilder instance using the specified object as a basis.- Parameters:
- from- the- Dependencyinstance to use as a basis
- forceCopy- the boolean indicating if a copy should be forced
- Returns:
- a new Builder
 
 
-