Class ManagedScopeSelector

java.lang.Object
org.eclipse.aether.util.graph.transformer.ConflictResolver.ScopeSelector
org.eclipse.aether.internal.impl.scope.ManagedScopeSelector

public final class ManagedScopeSelector extends org.eclipse.aether.util.graph.transformer.ConflictResolver.ScopeSelector
A scope selector for use with ConflictResolver that supports the scopes from ScopeManager. In general, this selector picks the widest scope present among conflicting dependencies where e.g. "compile" is wider than "runtime" which is wider than "test". If however a direct dependency is involved, its scope is selected.

This class also "bridges" between DependencyScope and Resolver that uses plain string labels for scopes.

  • Constructor Details

  • Method Details

    • selectScope

      public void selectScope(org.eclipse.aether.util.graph.transformer.ConflictResolver.ConflictContext context)
      Specified by:
      selectScope in class org.eclipse.aether.util.graph.transformer.ConflictResolver.ScopeSelector
    • chooseEffectiveScope

      Visible for testing. It chooses "widest" scope out of provided ones, unless system scope is present, in which case system scope is selected.