public class Dependency extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Dependency.Builder<B extends Dependency.Builder<B>>
Builder for a dependency.
|
static class |
Dependency.Exclusion
Define the reference to a transitive dependency to exclude.
|
| Modifier | Constructor and Description |
|---|---|
protected |
Dependency(Dependency.Builder<?> builder) |
| Modifier and Type | Method and Description |
|---|---|
static Dependency.Builder<?> |
from(Dependency dependency)
Initialize a new dependency
Dependency.Builder with the state of the specified
Dependency. |
String |
getArtifactId()
The artifact ID of the dependency.
|
String |
getClassifier()
The classifier of this dependency.
|
Set<Dependency.Exclusion> |
getExclusions()
The
exclusions to apply. |
String |
getGroupId()
The group ID of the dependency.
|
DependencyScope |
getScope()
The
scope of the dependency. |
String |
getType()
The type of the dependency.
|
VersionReference |
getVersion()
The
VersionReference of the dependency. |
static Dependency.Builder<?> |
withCoordinates(String groupId,
String artifactId)
Initialize a new dependency
Dependency.Builder with the specified coordinates. |
protected Dependency(Dependency.Builder<?> builder)
public static Dependency.Builder<?> withCoordinates(String groupId, String artifactId)
Dependency.Builder with the specified coordinates.groupId - the group ID of the dependencyartifactId - the artifact ID of the dependencypublic static Dependency.Builder<?> from(Dependency dependency)
Dependency.Builder with the state of the specified
Dependency.dependency - the dependency to use to initialize the builderdependencypublic String getGroupId()
public String getArtifactId()
public VersionReference getVersion()
VersionReference of the dependency. May be null for a
dependency whose version is expected to be provided by dependency management.nullpublic DependencyScope getScope()
scope of the dependency.public String getClassifier()
nullnullpublic String getType()
null to indicate that the default type
should be used (i.e. jar).nullpublic Set<Dependency.Exclusion> getExclusions()
exclusions to apply.Copyright © 2021 Pivotal Software, Inc.. All rights reserved.