Package org.apache.maven.api.services
Interface DependencyCollector
- All Superinterfaces:
Service
The DependencyCollector service can be used to collect dependencies
for a given artifact and builds a graph of them.
The dependencies collection mechanism will not download any artifacts,
and only the pom files will be downloaded.
- Since:
- 4.0
-
Method Summary
Modifier and TypeMethodDescriptioncollect
(DependencyCollectorRequest request) Collects the transitive dependencies and builds a dependency graph.default DependencyCollectorResult
Collects the transitive dependencies of some artifacts and builds a dependency graph.default DependencyCollectorResult
collect
(Session session, DependencyCoordinate root) Collects the transitive dependencies of some artifacts and builds a dependency graph.default DependencyCollectorResult
Collects the transitive dependencies of some artifacts and builds a dependency graph.
-
Method Details
-
collect
Collects the transitive dependencies and builds a dependency graph. Note that this operation is only concerned about determining the coordinates of the transitive dependencies and does not actually resolve the artifact files.- Parameters:
request
- the dependency collection request, must not benull
- Returns:
- the collection result, never
null
- Throws:
DependencyCollectorException
- if the dependency tree could not be builtIllegalArgumentException
- if an argument is null or invalid- See Also:
-
collect
@Nonnull default DependencyCollectorResult collect(@Nonnull Session session, @Nonnull DependencyCoordinate root) Collects the transitive dependencies of some artifacts and builds a dependency graph. Note that this operation is only concerned about determining the coordinates of the transitive dependencies and does not actually resolve the artifact files.- Parameters:
session
- theSession
, must not benull
root
- the Maven Dependency, must not benull
- Returns:
- the collection result, never
null
- Throws:
DependencyCollectorException
- if the dependency tree could not be builtIllegalArgumentException
- if an argument is null or invalid- See Also:
-
collect
@Nonnull default DependencyCollectorResult collect(@Nonnull Session session, @Nonnull Project project) Collects the transitive dependencies of some artifacts and builds a dependency graph. Note that this operation is only concerned about determining the coordinates of the transitive dependencies and does not actually resolve the artifact files.- Parameters:
session
- theSession
, must not benull
project
- theProject
, must not benull
- Returns:
- the collection result, never
null
- Throws:
DependencyCollectorException
- if the dependency tree could not be builtIllegalArgumentException
- if an argument is null or invalid- See Also:
-
collect
@Nonnull default DependencyCollectorResult collect(@Nonnull Session session, @Nonnull Artifact artifact) Collects the transitive dependencies of some artifacts and builds a dependency graph. Note that this operation is only concerned about determining the coordinates of the transitive dependencies and does not actually resolve the artifact files.- Parameters:
session
- theSession
, must not benull
artifact
- theArtifact
, must not benull
- Returns:
- the collection result, never
null
- Throws:
DependencyCollectorException
- if the dependency tree could not be builtIllegalArgumentException
- if an argument is null or invalid- See Also:
-