Package org.apache.maven.internal.impl
Class DefaultDependency
java.lang.Object
org.apache.maven.internal.impl.AetherDependencyWrapper
org.apache.maven.internal.impl.DefaultDependency
- All Implemented Interfaces:
Artifact,Dependency
-
Field Summary
FieldsFields inherited from class org.apache.maven.internal.impl.AetherDependencyWrapper
dependency, session -
Constructor Summary
ConstructorsConstructorDescriptionDefaultDependency(InternalSession session, org.eclipse.aether.graph.Dependency dependency) -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the version or meta-version of the artifact.Returns the version of the artifact.inthashCode()booleanReturns whether the dependency is optional or mandatory.booleanDetermines whether this artifact uses a snapshot version.key()Returns a unique identifier for this artifact.Returns coordinates with the same identifiers as this dependency.Methods inherited from class org.apache.maven.internal.impl.AetherDependencyWrapper
getArtifactId, getClassifier, getExtension, getGroupId, getScope, getType, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.maven.api.Artifact
getArtifactId, getClassifier, getExtension, getGroupIdMethods inherited from interface org.apache.maven.api.Dependency
getScope, getType
-
Field Details
-
key
-
-
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. -
getVersion
Description copied from interface:ArtifactReturns the version of the artifact. Contrarily toArtifactCoordinates, eachArtifactis associated to a specific version instead of a range of versions. If the base version contains a meta-version such asSNAPSHOT, those keywords are replaced by, for example, the actual timestamp.- Specified by:
getVersionin interfaceArtifact- Returns:
- the version of the artifact
- See Also:
-
getBaseVersion
Description copied from interface:ArtifactReturns the version or meta-version of the artifact. A meta-version is a version suffixed with theSNAPSHOTkeyword. Meta-versions are represented in a base version by their symbols (e.g.,SNAPSHOT), while they are replaced by, for example, the actual timestamp in the version.- Specified by:
getBaseVersionin interfaceArtifact- Returns:
- the version or meta-version of the artifact
-
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:
-
isOptional
public boolean isOptional()Description copied from interface:DependencyReturns whether the dependency is optional or mandatory. Contrarily toDependencyCoordinates, the obligation of aDependencyis always present. The value is computed during the dependencies collection phase.- Specified by:
isOptionalin interfaceDependency- Returns:
trueif the dependency is optional, orfalseif mandatory- See Also:
-
toCoordinates
Description copied from interface:DependencyReturns coordinates with the same identifiers as this dependency.- Specified by:
toCoordinatesin interfaceArtifact- Specified by:
toCoordinatesin interfaceDependency- Returns:
- coordinates with the same identifiers as this dependency
- See Also:
-
equals
-
hashCode
public int hashCode()
-