Package org.apache.maven.internal.impl
Class DefaultDependencyResolver
java.lang.Object
org.apache.maven.internal.impl.DefaultDependencyResolver
- All Implemented Interfaces:
Service,DependencyResolver
@Named
@Singleton
public class DefaultDependencyResolver
extends Object
implements DependencyResolver
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncollect(DependencyResolverRequest request) Collects the transitive dependencies and builds a dependency graph.Flattens a list of nodes.resolve(DependencyResolverRequest request) Collects, flattens and resolves the dependencies.
-
Constructor Details
-
DefaultDependencyResolver
public DefaultDependencyResolver()
-
-
Method Details
-
collect
@Nonnull public DependencyResolverResult collect(@Nonnull DependencyResolverRequest request) throws DependencyResolverException, IllegalArgumentException Description copied from interface:DependencyResolverCollects 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.- Specified by:
collectin interfaceDependencyResolver- 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
@Nonnull public List<Node> flatten(@Nonnull Session s, @Nonnull Node node, @Nullable PathScope scope) throws DependencyResolverException Description copied from interface:DependencyResolverFlattens a list of nodes. Note that thePathScopeargument should usually be null as the dependency tree has been filtered during collection for the appropriate scope.- Specified by:
flattenin interfaceDependencyResolver- Parameters:
s- theSession, must not benullnode- theNodeto flatten, must not benullscope- an optionalPathScopeto filter out dependencies- Returns:
- the flattened list of node
- Throws:
DependencyResolverException
-
resolve
public DependencyResolverResult resolve(DependencyResolverRequest request) throws DependencyResolverException, DependencyResolverException, ArtifactResolverException Collects, flattens and resolves the dependencies.- Specified by:
resolvein interfaceDependencyResolver- Parameters:
request- the request to resolve- Returns:
- the result of the resolution
- Throws:
DependencyResolverExceptionArtifactResolverException- See Also:
-