Package org.apache.maven.api.services
Interface DependencyCollector
- All Superinterfaces:
- Service
- All Known Implementing Classes:
- DefaultDependencyCollector
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.0
- 
Method SummaryModifier and TypeMethodDescriptioncollect(DependencyCollectorRequest request) Collects the transitive dependencies and builds a dependency graph.default DependencyCollectorResultCollects the transitive dependencies of some artifacts and builds a dependency graph.default DependencyCollectorResultcollect(Session session, DependencyCoordinate root) Collects the transitive dependencies of some artifacts and builds a dependency graph.default DependencyCollectorResultCollects the transitive dependencies of some artifacts and builds a dependency graph.
- 
Method Details- 
collectCollects 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 be- null
- Returns:
- the collection result, never null
- Throws:
- DependencyCollectorException- if the dependency tree could not be built
- IllegalArgumentException- 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- the- Session, must not be- null
- root- the Maven Dependency, must not be- null
- Returns:
- the collection result, never null
- Throws:
- DependencyCollectorException- if the dependency tree could not be built
- IllegalArgumentException- 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- the- Session, must not be- null
- project- the- Project, must not be- null
- Returns:
- the collection result, never null
- Throws:
- DependencyCollectorException- if the dependency tree could not be built
- IllegalArgumentException- 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- the- Session, must not be- null
- artifact- the- Artifact, must not be- null
- Returns:
- the collection result, never null
- Throws:
- DependencyCollectorException- if the dependency tree could not be built
- IllegalArgumentException- if an argument is null or invalid
- See Also:
 
 
-