Class DependencyCollectorDelegate

java.lang.Object
org.eclipse.aether.internal.impl.collect.DependencyCollectorDelegate
All Implemented Interfaces:
DependencyCollector
Direct Known Subclasses:
BfDependencyCollector, DfDependencyCollector

public abstract class DependencyCollectorDelegate extends Object implements DependencyCollector
Helper class for delegate implementations, they MUST subclass this class.
Since:
1.8.0
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected static class 
    Helper class used during collection.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final Map<String,org.eclipse.aether.spi.artifact.decorator.ArtifactDecoratorFactory>
     
    static 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

    Constructors
    Modifier
    Constructor
    Description
    protected
    DependencyCollectorDelegate(RemoteRepositoryManager remoteRepositoryManager, ArtifactDescriptorReader artifactDescriptorReader, VersionRangeResolver versionRangeResolver, Map<String,org.eclipse.aether.spi.artifact.decorator.ArtifactDecoratorFactory> artifactDecoratorFactories)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected 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 child RequestTrace instance from passed in RequestTrace and parameters by creating CollectStepDataImpl 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)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

  • 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 interface DependencyCollector
      Parameters:
      session - The repository session, must not be null.
      request - The collection request, must not be null.
      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)
    • 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 child RequestTrace instance from passed in RequestTrace and parameters by creating CollectStepDataImpl 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 from CollectRequest.getRequestContext(), never null.
      path - List representing the path of dependency nodes, never null. Caller must ensure, that this list does not change during the lifetime of the requested RequestTrace 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

      protected List<org.eclipse.aether.graph.Dependency> mergeDeps(List<org.eclipse.aether.graph.Dependency> dominant, List<org.eclipse.aether.graph.Dependency> recessive)
    • getId

      protected static String getId(org.eclipse.aether.artifact.Artifact a)
    • 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)