Package org.apache.maven.api.services
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.default DependencyResolverResultcollect(Session session, DependencyCoordinates root) Collects the transitive dependencies of some artifacts and builds a dependency graph.default DependencyResolverResultCollects the transitive dependencies of some artifacts and builds a dependency graph.default DependencyResolverResultflatten(DependencyResolverRequest request) Flattens a list of nodes.default DependencyResolverResultdefault 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) 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 benullroot- the Maven Dependency, 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) 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 benullproject- theProject, 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) 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 benullartifact- theArtifact, 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
Flattens a list of nodes.- Parameters:
session-node-scope-- Returns:
- Throws:
DependencyResolverException
-
flatten
-
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:
-