Class DefaultDependencyResolver
java.lang.Object
org.apache.maven.impl.DefaultDependencyResolver
- All Implemented Interfaces:
- Service,- DependencyResolver
@Named
@Singleton
public class DefaultDependencyResolver
extends Object
implements DependencyResolver
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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- 
DefaultDependencyResolverpublic 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 interface- DependencyResolver
- Parameters:
- request- the dependency collection request, must not be- null
- Returns:
- the collection result, never null
- Throws:
- DependencyResolverException- if the dependency tree could not be built
- IllegalArgumentException- 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 interface- DependencyResolver
- Parameters:
- s- the- Session, must not be- null
- node- the- Nodeto flatten, must not be- null
- scope- an optional- PathScopeto filter out dependencies
- Returns:
- the flattened list of node
- Throws:
- DependencyResolverException
 
- 
resolvepublic DependencyResolverResult resolve(DependencyResolverRequest request) throws DependencyResolverException, ArtifactResolverException Collects, flattens and resolves the dependencies.- Specified by:
- resolvein interface- DependencyResolver
- Parameters:
- request- the request to resolve
- Returns:
- the result of the resolution
- Throws:
- DependencyResolverException
- ArtifactResolverException
- See Also:
 
 
-