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 DependencyResolverResult
collect
(DependencyResolverRequest request) Collects the transitive dependencies and builds a dependency graph.default DependencyResolverResult
Collects the transitive dependencies of some artifacts and builds a dependency graph.default DependencyResolverResult
collect
(Session session, DependencyCoordinates root) Collects the transitive dependencies of some artifacts and builds a dependency graph.default DependencyResolverResult
Collects the transitive dependencies of some artifacts and builds a dependency graph.default DependencyResolverResult
flatten
(DependencyResolverRequest request) Flattens a list of nodes.default DependencyResolverResult
default DependencyResolverResult
resolve
(DependencyResolverRequest request) This method collects, flattens and resolves the dependencies.default DependencyResolverResult
resolve
(Session session, List<DependencyCoordinates> dependencies) default DependencyResolverResult
resolve
(Session session, List<DependencyCoordinates> dependencies, PathScope scope) default DependencyResolverResult
resolve
(Session session, DependencyCoordinates dependency) default DependencyResolverResult
resolve
(Session session, DependencyCoordinates dependency, PathScope scope) default DependencyResolverResult
default 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 benull
root
- 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 benull
project
- 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 benull
artifact
- 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:
DependencyResolverException
ArtifactResolverException
- See Also:
-