Class DefaultDependency
java.lang.Object
org.apache.maven.impl.DefaultDependency
- All Implemented Interfaces:
org.apache.maven.api.Artifact, org.apache.maven.api.Dependency
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultDependency(InternalSession session, org.eclipse.aether.graph.Dependency dependency) -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the artifact identifier of the wrapped dependency.org.apache.maven.api.VersionReturns 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.org.apache.maven.api.DependencyScopegetScope()Returns the scope (compile, test, …) of this dependency.org.apache.maven.api.TypegetType()Returns the type of the wrapped dependency.org.apache.maven.api.VersioninthashCode()booleanbooleankey()org.apache.maven.api.DependencyCoordinatestoString()Returns a string representation of this dependency.Methods inherited from interface org.apache.maven.api.Artifact
getArtifactId, getClassifier, getExtension, getGroupIdMethods 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
- Specified by:
keyin interfaceorg.apache.maven.api.Artifact
-
getVersion
public org.apache.maven.api.Version getVersion()- Specified by:
getVersionin interfaceorg.apache.maven.api.Artifact
-
getBaseVersion
public org.apache.maven.api.Version getBaseVersion()- Specified by:
getBaseVersionin interfaceorg.apache.maven.api.Artifact
-
isSnapshot
public boolean isSnapshot()- Specified by:
isSnapshotin interfaceorg.apache.maven.api.Artifact
-
isOptional
public boolean isOptional()- Specified by:
isOptionalin interfaceorg.apache.maven.api.Dependency
-
toCoordinates
@Nonnull public org.apache.maven.api.DependencyCoordinates toCoordinates()- Specified by:
toCoordinatesin interfaceorg.apache.maven.api.Artifact- Specified by:
toCoordinatesin interfaceorg.apache.maven.api.Dependency
-
equals
-
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
public org.apache.maven.api.Type 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
@Nonnull public org.apache.maven.api.DependencyScope getScope()Returns the scope (compile, test, …) of this dependency.- Returns:
- the scope (compile, test, …) of this dependency
-
toString
-