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
  • Field Details

  • Constructor Details

  • Method Details

    • initService

      public void initService(org.eclipse.aether.spi.locator.ServiceLocator locator)
    • setRemoteRepositoryManager

    • setArtifactDescriptorReader

    • setVersionRangeResolver

    • 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)
    • optimizeSession

      protected org.eclipse.aether.RepositorySystemSession optimizeSession(org.eclipse.aether.RepositorySystemSession session)
    • 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.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