Interface DependencyResolver
- All Superinterfaces:
 Service
- All Known Implementing Classes:
 DefaultDependencyResolver
Collects, flattens and resolves dependencies.
- 
Method Summary
Modifier and TypeMethodDescriptiondefault DependencyResolverResultcollect(DependencyResolverRequest request) Collects the transitive dependencies and builds a dependency graph.default DependencyResolverResultCollects the transitive dependencies of some artifacts and builds a dependency graph for the given path scope.default DependencyResolverResultcollect(Session session, DependencyCoordinates root, PathScope scope) Collects the transitive dependencies of some artifacts and builds a dependency graph for the given path scope.default DependencyResolverResultCollects the transitive dependencies of some artifacts and builds a dependency graph for the given path scope.default DependencyResolverResultflatten(DependencyResolverRequest request) Flattens a list of nodes.default DependencyResolverResultresolve(DependencyResolverRequest request) This method collects, flattens and resolves the dependencies.default DependencyResolverResultresolve(Session session, List<DependencyCoordinates> dependencies) default DependencyResolverResultresolve(Session session, List<DependencyCoordinates> dependencies, PathScope scope) default DependencyResolverResultresolve(Session session, DependencyCoordinates dependency) default DependencyResolverResultresolve(Session session, DependencyCoordinates dependency, PathScope scope) default DependencyResolverResultdefault DependencyResolverResult 
- 
Method Details
- 
collect
@Nonnull default DependencyResolverResult collect(@Nonnull Session session, @Nonnull DependencyCoordinates root, @Nonnull PathScope scope) Collects the transitive dependencies of some artifacts and builds a dependency graph for the given path scope. 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 benullroot- the Maven Dependency, must not benullscope- the {link PathScope} to collect dependencies, must not benull- Returns:
 - the collection result, never 
null - Throws:
 DependencyResolverException- if the dependency tree could not be builtIllegalArgumentException- if an argument is null or invalid- See Also:
 
 - 
collect
@Nonnull default DependencyResolverResult collect(@Nonnull Session session, @Nonnull Project project, @Nonnull PathScope scope) Collects the transitive dependencies of some artifacts and builds a dependency graph for the given path scope. 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 benullproject- theProject, must not benullscope- the {link PathScope} to collect dependencies, must not benull- Returns:
 - the collection result, never 
null - Throws:
 DependencyResolverException- if the dependency tree could not be builtIllegalArgumentException- if an argument is null or invalid- See Also:
 
 - 
collect
@Nonnull default DependencyResolverResult collect(@Nonnull Session session, @Nonnull Artifact artifact, @Nonnull PathScope scope) Collects the transitive dependencies of some artifacts and builds a dependency graph for the given path scope. 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 benullartifact- theArtifact, must not benullscope- the {link PathScope} to collect dependencies, must not benull- Returns:
 - the collection result, never 
null - Throws:
 DependencyResolverException- if the dependency tree could not be builtIllegalArgumentException- if an argument is null or invalid- See Also:
 
 - 
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:
 DependencyResolverException- if the dependency tree could not be builtIllegalArgumentException- if an argument is null or invalid- See Also:
 
 - 
flatten
List<Node> flatten(@Nonnull Session session, @Nonnull Node node, @Nullable PathScope scope) throws DependencyResolverException Flattens a list of nodes. Note that thePathScopeargument should usually be null as the dependency tree has been filtered during collection for the appropriate scope.- Parameters:
 session- theSession, must not benullnode- theNodeto flatten, must not benullscope- an optionalPathScopeto filter out dependencies- Returns:
 - the flattened list of node
 - Throws:
 DependencyResolverException
 - 
flatten
 - 
flatten
 - 
resolve
 - 
resolve
 - 
resolve
@Nonnull default DependencyResolverResult resolve(@Nonnull Session session, @Nonnull DependencyCoordinates dependency)  - 
resolve
@Nonnull default DependencyResolverResult resolve(@Nonnull Session session, @Nonnull DependencyCoordinates dependency, @Nonnull PathScope scope)  - 
resolve
@Nonnull default DependencyResolverResult resolve(@Nonnull Session session, @Nonnull List<DependencyCoordinates> dependencies)  - 
resolve
@Nonnull default DependencyResolverResult resolve(@Nonnull Session session, @Nonnull List<DependencyCoordinates> dependencies, @Nonnull PathScope scope)  - 
resolve
DependencyResolverResult resolve(DependencyResolverRequest request) throws DependencyResolverException, ArtifactResolverException This method collects, flattens and resolves the dependencies.- Parameters:
 request- the request to resolve- Returns:
 - the result of the resolution
 - Throws:
 DependencyResolverExceptionArtifactResolverException- See Also:
 
 
 -