Class DefaultDependencyCollector
- java.lang.Object
-
- org.eclipse.aether.internal.impl.collect.DefaultDependencyCollector
-
- All Implemented Interfaces:
DependencyCollector
,Service
@Singleton @Named public class DefaultDependencyCollector extends java.lang.Object implements DependencyCollector, Service
Default implementation ofDependencyCollector
that merely indirect to selected delegate.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
CONFIG_PROP_COLLECTOR_IMPL
private static java.lang.String
DEFAULT_COLLECTOR_IMPL
private java.util.Map<java.lang.String,DependencyCollectorDelegate>
delegates
-
Constructor Summary
Constructors Constructor Description DefaultDependencyCollector()
Deprecated.SL is to be removed.DefaultDependencyCollector(java.util.Map<java.lang.String,DependencyCollectorDelegate> delegates)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CollectResult
collectDependencies(RepositorySystemSession session, CollectRequest request)
Collects the transitive dependencies of some artifacts and builds a dependency graph.void
initService(ServiceLocator locator)
Provides the opportunity to initialize this service and to acquire other services for its operation from the locator.
-
-
-
Field Detail
-
CONFIG_PROP_COLLECTOR_IMPL
private static final java.lang.String CONFIG_PROP_COLLECTOR_IMPL
- See Also:
- Constant Field Values
-
DEFAULT_COLLECTOR_IMPL
private static final java.lang.String DEFAULT_COLLECTOR_IMPL
- See Also:
- Constant Field Values
-
delegates
private final java.util.Map<java.lang.String,DependencyCollectorDelegate> delegates
-
-
Constructor Detail
-
DefaultDependencyCollector
@Deprecated public DefaultDependencyCollector()
Deprecated.SL is to be removed.Default ctor for SL.
-
DefaultDependencyCollector
@Inject public DefaultDependencyCollector(java.util.Map<java.lang.String,DependencyCollectorDelegate> delegates)
-
-
Method Detail
-
initService
public void initService(ServiceLocator locator)
Description copied from interface:Service
Provides the opportunity to initialize this service and to acquire other services for its operation from the locator. A service must not save the reference to the provided service locator.- Specified by:
initService
in interfaceService
- Parameters:
locator
- The service locator, must not benull
.
-
collectDependencies
public CollectResult collectDependencies(RepositorySystemSession session, CollectRequest request) throws DependencyCollectionException
Description copied from interface:DependencyCollector
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. The supplied session carries various hooks to customize the dependency graph that must be invoked throughout the operation.- Specified by:
collectDependencies
in interfaceDependencyCollector
- Parameters:
session
- The repository session, must not benull
.request
- The collection request, must not benull
.- Returns:
- The collection result, never
null
. - Throws:
DependencyCollectionException
- If the dependency tree could not be built.- See Also:
RepositorySystemSession.getDependencyTraverser()
,RepositorySystemSession.getDependencyManager()
,RepositorySystemSession.getDependencySelector()
,RepositorySystemSession.getVersionFilter()
,RepositorySystemSession.getDependencyGraphTransformer()
,RepositorySystem.collectDependencies(RepositorySystemSession, CollectRequest)
-
-