Package org.apache.maven.api
Interface Dependency
- All Superinterfaces:
- Artifact
- All Known Subinterfaces:
- DownloadedDependency
- All Known Implementing Classes:
- DefaultDependency
A result of collecting, flattening and resolving 
DependencyCoordinatess.
 Dependency is the output of the collection process, which builds the graph of dependencies,
 followed by flattening and resolution.
 The version selection is done for each dependency during the collection phase.
 The flatten phase will keep only a single version per (groupId, artifactId) pair.
 The resolution will actually download the dependencies (or artifacts) that have been computed.- Since:
- 4.0.0
- 
Method SummaryMethods inherited from interface org.apache.maven.api.ArtifactgetArtifactId, getBaseVersion, getClassifier, getExtension, getGroupId, getVersion, isSnapshot, key
- 
Method Details- 
getTypeReturns the type of the dependency. A dependency can be a JAR file, a modular-JAR if it is intended to be placed on the module-path, a JAR containing test classes, etc.- Returns:
- the type of the dependency
- See Also:
 
- 
getScopeReturns the time at which the dependency will be used. If may be, for example, at compile time only, at run time or at test time.- Returns:
- the time at which the dependency will be used
- See Also:
 
- 
isOptionalboolean isOptional()Returns whether the dependency is optional or mandatory. Contrarily toDependencyCoordinates, the obligation of aDependencyis always present. The value is computed during the dependencies collection phase.- Returns:
- trueif the dependency is optional, or- falseif mandatory
- See Also:
 
- 
toCoordinatesReturns coordinates with the same identifiers as this dependency.- Specified by:
- toCoordinatesin interface- Artifact
- Returns:
- coordinates with the same identifiers as this dependency
- See Also:
 
 
-