Package org.apache.maven.internal.impl
Class DefaultDependency
java.lang.Object
org.apache.maven.internal.impl.DefaultDependency
- All Implemented Interfaces:
Artifact
,Dependency
-
Constructor Summary
ConstructorDescriptionDefaultDependency
(InternalSession session, org.eclipse.aether.graph.Dependency dependency) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the artifact identifier of the wrapped dependency.Returns the classifier ("jar", "test-jar", …) of the wrapped dependency.Returns the file extension of the wrapped dependency.Returns the group identifier of the wrapped dependency.getScope()
Returns the scope (compile, test, …) of this dependency.getType()
Returns the type of the wrapped dependency.int
hashCode()
boolean
boolean
key()
toString()
Returns a string representation of this dependency.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.maven.api.Artifact
getArtifactId, getClassifier, getExtension, getGroupId
Methods inherited from interface org.apache.maven.api.Dependency
getScope, getType
-
Constructor Details
-
DefaultDependency
public DefaultDependency(@Nonnull InternalSession session, @Nonnull org.eclipse.aether.graph.Dependency dependency)
-
-
Method Details
-
key
-
getVersion
- Specified by:
getVersion
in interfaceArtifact
-
getBaseVersion
- Specified by:
getBaseVersion
in interfaceArtifact
-
isSnapshot
public boolean isSnapshot()- Specified by:
isSnapshot
in interfaceArtifact
-
isOptional
public boolean isOptional()- Specified by:
isOptional
in interfaceDependency
-
toCoordinates
- Specified by:
toCoordinates
in interfaceArtifact
- Specified by:
toCoordinates
in interfaceDependency
-
equals
-
hashCode
public int hashCode() -
getGroupId
Returns the group identifier of the wrapped dependency. The default implementation delegates to the Eclipse Aether artifact.- Returns:
- the group identifier of the wrapped dependency
-
getArtifactId
Returns the artifact identifier of the wrapped dependency. The default implementation delegates to the Eclipse Aether artifact.- Returns:
- the artifact identifier of the wrapped dependency
-
getExtension
Returns the file extension of the wrapped dependency. The default implementation delegates to the Eclipse Aether artifact.- Returns:
- the file extension of the wrapped dependency
-
getType
Returns the type of the wrapped dependency. The default implementation infers the type from the properties associated to the Eclipse Aether artifact.- Returns:
- the type of the wrapped dependency
-
getClassifier
Returns the classifier ("jar", "test-jar", …) of the wrapped dependency. The default implementation first delegates to the Eclipse Aether artifact. If the latter does not provide a non-empty classifier, then the default value is determined by type.- Returns:
- the classifier ("jar", "test-jar", …) of the wrapped dependency
-
getScope
Returns the scope (compile, test, …) of this dependency.- Returns:
- the scope (compile, test, …) of this dependency
-
toString
Returns a string representation of this dependency. This is for debugging purposes only and may change in any future version.
-