Class DefaultDependencyCollector
- java.lang.Object
-
- org.eclipse.aether.internal.impl.collect.DefaultDependencyCollector
-
- All Implemented Interfaces:
DependencyCollector
@Singleton @Named public class DefaultDependencyCollector extends java.lang.Object implements DependencyCollector
Default implementation ofDependencyCollectorthat merely indirect to selected delegate.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCONFIG_PROP_COLLECTOR_IMPLThe name of the dependency collector implementation to use: depth-first (original) named "df", and breadth-first (new in 1.8.0) named "bf".static java.lang.StringCONFIG_PROPS_PREFIXstatic java.lang.StringDEFAULT_COLLECTOR_IMPL
-
Constructor Summary
Constructors Constructor Description DefaultDependencyCollector(java.util.Map<java.lang.String,DependencyCollectorDelegate> delegates)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.aether.collection.CollectResultcollectDependencies(org.eclipse.aether.RepositorySystemSession session, org.eclipse.aether.collection.CollectRequest request)Collects the transitive dependencies of some artifacts and builds a dependency graph.
-
-
-
Field Detail
-
CONFIG_PROPS_PREFIX
public static final java.lang.String CONFIG_PROPS_PREFIX
- See Also:
- Constant Field Values
-
CONFIG_PROP_COLLECTOR_IMPL
public static final java.lang.String CONFIG_PROP_COLLECTOR_IMPL
The name of the dependency collector implementation to use: depth-first (original) named "df", and breadth-first (new in 1.8.0) named "bf". Both collectors produce equivalent results, but they may differ performance wise, depending on project being applied to. Our experience shows that existing "df" is well suited for smaller to medium size projects, while "bf" may perform better on huge projects with many dependencies. Experiment (and come back to us!) to figure out which one suits you the better.- Since:
- 1.8.0
- See Also:
- Constant Field Values
-
DEFAULT_COLLECTOR_IMPL
public static final java.lang.String DEFAULT_COLLECTOR_IMPL
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DefaultDependencyCollector
@Inject public DefaultDependencyCollector(java.util.Map<java.lang.String,DependencyCollectorDelegate> delegates)
-
-
Method Detail
-
collectDependencies
public org.eclipse.aether.collection.CollectResult collectDependencies(org.eclipse.aether.RepositorySystemSession session, org.eclipse.aether.collection.CollectRequest request) throws org.eclipse.aether.collection.DependencyCollectionException
Description copied from interface:DependencyCollectorCollects 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:
collectDependenciesin interfaceDependencyCollector- Parameters:
session- The repository session, must not benull.request- The collection request, must not benull.- Returns:
- The collection result, never
null. - Throws:
org.eclipse.aether.collection.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)
-
-