Class DependencyCollectorDelegate
java.lang.Object
org.eclipse.aether.internal.impl.collect.DependencyCollectorDelegate
- All Implemented Interfaces:
DependencyCollector
- Direct Known Subclasses:
BfDependencyCollector
,DfDependencyCollector
Helper class for delegate implementations, they MUST subclass this class.
- Since:
- 1.8.0
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
Helper class used during collection. -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Only up to the given amount cyclic dependencies are emitted.static final String
Only exceptions up to the number given in this configuration property are emitted.static final int
static final int
protected final ArtifactDescriptorReader
protected final org.slf4j.Logger
protected final RemoteRepositoryManager
protected final VersionRangeResolver
-
Constructor Summary
ModifierConstructorDescriptionprotected
DependencyCollectorDelegate
(RemoteRepositoryManager remoteRepositoryManager, ArtifactDescriptorReader artifactDescriptorReader, VersionRangeResolver versionRangeResolver, Map<String, org.eclipse.aether.spi.artifact.decorator.ArtifactDecoratorFactory> artifactDecoratorFactories) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.eclipse.aether.resolution.VersionRangeResult
cachedResolveRangeResult
(org.eclipse.aether.resolution.VersionRangeRequest rangeRequest, DataPool pool, org.eclipse.aether.RepositorySystemSession session) final org.eclipse.aether.collection.CollectResult
collectDependencies
(org.eclipse.aether.RepositorySystemSession session, org.eclipse.aether.collection.CollectRequest request) Collects the transitive dependencies of some artifacts and builds a dependency graph.protected org.eclipse.aether.RequestTrace
collectStepTrace
(org.eclipse.aether.RequestTrace trace, String context, List<org.eclipse.aether.graph.DependencyNode> path, org.eclipse.aether.graph.Dependency node) Creates childRequestTrace
instance from passed inRequestTrace
and parameters by creatingCollectStepDataImpl
instance out of passed in data.protected static org.eclipse.aether.resolution.ArtifactDescriptorRequest
createArtifactDescriptorRequest
(String requestContext, org.eclipse.aether.RequestTrace requestTrace, List<org.eclipse.aether.repository.RemoteRepository> repositories, org.eclipse.aether.graph.Dependency d) protected static org.eclipse.aether.graph.DefaultDependencyNode
createDependencyNode
(List<org.eclipse.aether.artifact.Artifact> relocations, PremanagedDependency preManaged, org.eclipse.aether.resolution.VersionRangeResult rangeResult, org.eclipse.aether.version.Version version, org.eclipse.aether.graph.Dependency d, Collection<org.eclipse.aether.artifact.Artifact> aliases, List<org.eclipse.aether.repository.RemoteRepository> repos, String requestContext) protected static org.eclipse.aether.graph.DefaultDependencyNode
createDependencyNode
(List<org.eclipse.aether.artifact.Artifact> relocations, PremanagedDependency preManaged, org.eclipse.aether.resolution.VersionRangeResult rangeResult, org.eclipse.aether.version.Version version, org.eclipse.aether.graph.Dependency d, org.eclipse.aether.resolution.ArtifactDescriptorResult descriptorResult, org.eclipse.aether.graph.DependencyNode cycleNode) protected static org.eclipse.aether.resolution.VersionRangeRequest
createVersionRangeRequest
(String requestContext, org.eclipse.aether.RequestTrace requestTrace, List<org.eclipse.aether.repository.RemoteRepository> repositories, org.eclipse.aether.graph.Dependency dependency) protected abstract void
doCollectDependencies
(org.eclipse.aether.RepositorySystemSession session, org.eclipse.aether.RequestTrace trace, DataPool pool, DefaultDependencyCollectionContext context, DefaultVersionFilterContext versionContext, org.eclipse.aether.collection.CollectRequest request, org.eclipse.aether.graph.DependencyNode node, List<org.eclipse.aether.repository.RemoteRepository> repositories, List<org.eclipse.aether.graph.Dependency> dependencies, List<org.eclipse.aether.graph.Dependency> managedDependencies, DependencyCollectorDelegate.Results results) protected static List
<? extends org.eclipse.aether.version.Version> filterVersions
(org.eclipse.aether.graph.Dependency dependency, org.eclipse.aether.resolution.VersionRangeResult rangeResult, org.eclipse.aether.collection.VersionFilter verFilter, DefaultVersionFilterContext verContext) protected static String
getId
(org.eclipse.aether.artifact.Artifact a) protected static List
<org.eclipse.aether.repository.RemoteRepository> getRemoteRepositories
(org.eclipse.aether.repository.ArtifactRepository repository, List<org.eclipse.aether.repository.RemoteRepository> repositories) protected static boolean
isLackingDescriptor
(org.eclipse.aether.RepositorySystemSession session, org.eclipse.aether.artifact.Artifact artifact) protected List
<org.eclipse.aether.graph.Dependency> mergeDeps
(List<org.eclipse.aether.graph.Dependency> dominant, List<org.eclipse.aether.graph.Dependency> recessive) protected org.eclipse.aether.resolution.ArtifactDescriptorResult
resolveCachedArtifactDescriptor
(DataPool pool, org.eclipse.aether.resolution.ArtifactDescriptorRequest descriptorRequest, org.eclipse.aether.RepositorySystemSession session, org.eclipse.aether.graph.Dependency d, DependencyCollectorDelegate.Results results, List<org.eclipse.aether.graph.DependencyNode> nodes) protected org.eclipse.aether.RepositorySystemSession
setUpSession
(org.eclipse.aether.RepositorySystemSession session, org.eclipse.aether.collection.CollectRequest collectRequest, InternalScopeManager scopeManager)
-
Field Details
-
CONFIG_PROP_MAX_EXCEPTIONS
Only exceptions up to the number given in this configuration property are emitted. Exceptions which exceed that number are swallowed.- See Also:
- Sourced from:
RepositorySystemSession.getConfigProperties()
- Value type:
Integer
- Default value:
DEFAULT_MAX_EXCEPTIONS
-
DEFAULT_MAX_EXCEPTIONS
- See Also:
-
CONFIG_PROP_MAX_CYCLES
Only up to the given amount cyclic dependencies are emitted.- See Also:
- Sourced from:
RepositorySystemSession.getConfigProperties()
- Value type:
Integer
- Default value:
DEFAULT_MAX_CYCLES
-
DEFAULT_MAX_CYCLES
- See Also:
-
logger
-
remoteRepositoryManager
-
descriptorReader
-
versionRangeResolver
-
artifactDecoratorFactories
protected final Map<String,org.eclipse.aether.spi.artifact.decorator.ArtifactDecoratorFactory> artifactDecoratorFactories
-
-
Constructor Details
-
DependencyCollectorDelegate
protected DependencyCollectorDelegate(RemoteRepositoryManager remoteRepositoryManager, ArtifactDescriptorReader artifactDescriptorReader, VersionRangeResolver versionRangeResolver, Map<String, org.eclipse.aether.spi.artifact.decorator.ArtifactDecoratorFactory> artifactDecoratorFactories)
-
-
Method Details
-
collectDependencies
public final 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: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:
org.eclipse.aether.collection.DependencyCollectionException
- If the dependency tree could not be built.- See Also:
-
collectStepTrace
protected org.eclipse.aether.RequestTrace collectStepTrace(org.eclipse.aether.RequestTrace trace, String context, List<org.eclipse.aether.graph.DependencyNode> path, org.eclipse.aether.graph.Dependency node) Creates childRequestTrace
instance from passed inRequestTrace
and parameters by creatingCollectStepDataImpl
instance out of passed in data. Caller must ensure that passed in parameters are NOT affected by threading (or that there is no multi threading involved). In other words, the passed in values should be immutable.- Parameters:
trace
- The current trace instance.context
- The context fromCollectRequest.getRequestContext()
, nevernull
.path
- List representing the path of dependency nodes, nevernull
. Caller must ensure, that this list does not change during the lifetime of the requestedRequestTrace
instance. If it may change, simplest is to pass here a copy of used list.node
- Currently collected node, that collector came by following the passed in path.- Returns:
- A child request trance instance, never
null
.
-
doCollectDependencies
protected abstract void doCollectDependencies(org.eclipse.aether.RepositorySystemSession session, org.eclipse.aether.RequestTrace trace, DataPool pool, DefaultDependencyCollectionContext context, DefaultVersionFilterContext versionContext, org.eclipse.aether.collection.CollectRequest request, org.eclipse.aether.graph.DependencyNode node, List<org.eclipse.aether.repository.RemoteRepository> repositories, List<org.eclipse.aether.graph.Dependency> dependencies, List<org.eclipse.aether.graph.Dependency> managedDependencies, DependencyCollectorDelegate.Results results) throws org.eclipse.aether.collection.DependencyCollectionException - Throws:
org.eclipse.aether.collection.DependencyCollectionException
-
setUpSession
protected org.eclipse.aether.RepositorySystemSession setUpSession(org.eclipse.aether.RepositorySystemSession session, org.eclipse.aether.collection.CollectRequest collectRequest, InternalScopeManager scopeManager) -
mergeDeps
-
getId
-
createDependencyNode
protected static org.eclipse.aether.graph.DefaultDependencyNode createDependencyNode(List<org.eclipse.aether.artifact.Artifact> relocations, PremanagedDependency preManaged, org.eclipse.aether.resolution.VersionRangeResult rangeResult, org.eclipse.aether.version.Version version, org.eclipse.aether.graph.Dependency d, Collection<org.eclipse.aether.artifact.Artifact> aliases, List<org.eclipse.aether.repository.RemoteRepository> repos, String requestContext) -
createDependencyNode
protected static org.eclipse.aether.graph.DefaultDependencyNode createDependencyNode(List<org.eclipse.aether.artifact.Artifact> relocations, PremanagedDependency preManaged, org.eclipse.aether.resolution.VersionRangeResult rangeResult, org.eclipse.aether.version.Version version, org.eclipse.aether.graph.Dependency d, org.eclipse.aether.resolution.ArtifactDescriptorResult descriptorResult, org.eclipse.aether.graph.DependencyNode cycleNode) -
createArtifactDescriptorRequest
protected static org.eclipse.aether.resolution.ArtifactDescriptorRequest createArtifactDescriptorRequest(String requestContext, org.eclipse.aether.RequestTrace requestTrace, List<org.eclipse.aether.repository.RemoteRepository> repositories, org.eclipse.aether.graph.Dependency d) -
createVersionRangeRequest
protected static org.eclipse.aether.resolution.VersionRangeRequest createVersionRangeRequest(String requestContext, org.eclipse.aether.RequestTrace requestTrace, List<org.eclipse.aether.repository.RemoteRepository> repositories, org.eclipse.aether.graph.Dependency dependency) -
cachedResolveRangeResult
protected org.eclipse.aether.resolution.VersionRangeResult cachedResolveRangeResult(org.eclipse.aether.resolution.VersionRangeRequest rangeRequest, DataPool pool, org.eclipse.aether.RepositorySystemSession session) throws org.eclipse.aether.resolution.VersionRangeResolutionException - Throws:
org.eclipse.aether.resolution.VersionRangeResolutionException
-
isLackingDescriptor
protected static boolean isLackingDescriptor(org.eclipse.aether.RepositorySystemSession session, org.eclipse.aether.artifact.Artifact artifact) -
getRemoteRepositories
protected static List<org.eclipse.aether.repository.RemoteRepository> getRemoteRepositories(org.eclipse.aether.repository.ArtifactRepository repository, List<org.eclipse.aether.repository.RemoteRepository> repositories) -
filterVersions
protected static List<? extends org.eclipse.aether.version.Version> filterVersions(org.eclipse.aether.graph.Dependency dependency, org.eclipse.aether.resolution.VersionRangeResult rangeResult, org.eclipse.aether.collection.VersionFilter verFilter, DefaultVersionFilterContext verContext) throws org.eclipse.aether.resolution.VersionRangeResolutionException - Throws:
org.eclipse.aether.resolution.VersionRangeResolutionException
-
resolveCachedArtifactDescriptor
protected org.eclipse.aether.resolution.ArtifactDescriptorResult resolveCachedArtifactDescriptor(DataPool pool, org.eclipse.aether.resolution.ArtifactDescriptorRequest descriptorRequest, org.eclipse.aether.RepositorySystemSession session, org.eclipse.aether.graph.Dependency d, DependencyCollectorDelegate.Results results, List<org.eclipse.aether.graph.DependencyNode> nodes)
-