Class DirectScopeDependencySelector

java.lang.Object
org.apache.maven.shared.dependency.graph.internal.DirectScopeDependencySelector
All Implemented Interfaces:
org.eclipse.aether.collection.DependencySelector

public class DirectScopeDependencySelector extends Object implements org.eclipse.aether.collection.DependencySelector
A dependency selector that excludes dependencies of an specific Scope which occur beyond level one of the dependency graph.
Since:
3.1.0
Author:
Gabriel Belingueres
See Also:
  • Dependency.getScope()
  • Constructor Details

    • DirectScopeDependencySelector

      public DirectScopeDependencySelector(String scope)
  • Method Details

    • selectDependency

      public boolean selectDependency(org.eclipse.aether.graph.Dependency dependency)
      Decides whether the specified dependency should be included in the dependency graph.
      Specified by:
      selectDependency in interface org.eclipse.aether.collection.DependencySelector
      Parameters:
      dependency - The dependency to check, must not be null.
      Returns:
      false if the dependency should be excluded from the children of the current node, true otherwise.
    • deriveChildSelector

      public org.eclipse.aether.collection.DependencySelector deriveChildSelector(org.eclipse.aether.collection.DependencyCollectionContext context)
      Derives a dependency selector for the specified collection context. When calculating the child selector, implementors are strongly advised to simply return the current instance if nothing changed to help save memory.
      Specified by:
      deriveChildSelector in interface org.eclipse.aether.collection.DependencySelector
      Parameters:
      context - The dependency collection context, must not be null.
      Returns:
      The dependency selector for the target node, must not be null.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object