Package org.apache.maven.internal.impl
Class DefaultDependency
java.lang.Object
org.apache.maven.internal.impl.DefaultDependency
- All Implemented Interfaces:
Artifact,Dependency
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultDependency(InternalSession session, org.eclipse.aether.graph.Dependency dependency) -
Method Summary
Modifier and TypeMethodDescriptionbooleanThe artifactId of the artifact.The base version of the artifact.The classifier of the artifact.org.eclipse.aether.graph.DependencyThe dependency properties.The file extension of the artifact.The groupId of the artifact.getScope()getType()The dependency type.The version of the artifact.inthashCode()booleanbooleanDetermines whether this artifact uses a snapshot version.key()Returns a unique identifier for this artifact.Creates aDependencyCoordinatebased on thisDependency.toString()
-
Constructor Details
-
DefaultDependency
public DefaultDependency(@Nonnull InternalSession session, @Nonnull org.eclipse.aether.graph.Dependency dependency)
-
-
Method Details
-
key
Description copied from interface:ArtifactReturns a unique identifier for this artifact. The identifier is composed of groupId, artifactId, extension, classifier, and version. -
getDependency
-
getGroupId
Description copied from interface:ArtifactThe groupId of the artifact.- Specified by:
getGroupIdin interfaceArtifact- Returns:
- the groupId
-
getArtifactId
Description copied from interface:ArtifactThe artifactId of the artifact.- Specified by:
getArtifactIdin interfaceArtifact- Returns:
- the artifactId
-
getClassifier
Description copied from interface:ArtifactThe classifier of the artifact.- Specified by:
getClassifierin interfaceArtifact- Returns:
- the classifier or an empty string if none, never
null
-
getVersion
Description copied from interface:ArtifactThe version of the artifact.- Specified by:
getVersionin interfaceArtifact- Returns:
- the version
-
getBaseVersion
Description copied from interface:ArtifactThe base version of the artifact.- Specified by:
getBaseVersionin interfaceArtifact- Returns:
- the version
-
getExtension
Description copied from interface:ArtifactThe file extension of the artifact.- Specified by:
getExtensionin interfaceArtifact- Returns:
- the extension
-
getType
Description copied from interface:DependencyThe dependency type.- Specified by:
getTypein interfaceDependency- Returns:
- the dependency type, never
null
-
getDependencyProperties
Description copied from interface:DependencyThe dependency properties.- Specified by:
getDependencyPropertiesin interfaceDependency- Returns:
- the dependency properties, never
null
-
isSnapshot
public boolean isSnapshot()Description copied from interface:ArtifactDetermines whether this artifact uses a snapshot version.- Specified by:
isSnapshotin interfaceArtifact- Returns:
trueif the artifact is a snapshot,falseotherwise- See Also:
-
getScope
- Specified by:
getScopein interfaceDependency
-
isOptional
- Specified by:
isOptionalin interfaceDependency
-
toCoordinate
Description copied from interface:DependencyCreates aDependencyCoordinatebased on thisDependency.- Specified by:
toCoordinatein interfaceArtifact- Specified by:
toCoordinatein interfaceDependency- Returns:
- a
DependencyCoordinate - See Also:
-
equals
-
hashCode
public int hashCode() -
toString
-