Class 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.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String chooseEffectiveScope​(java.util.Set<java.lang.String> scopes)
      Visible for testing.
      void selectScope​(org.eclipse.aether.util.graph.transformer.ConflictResolver.ConflictContext context)  
      • Methods inherited from class org.eclipse.aether.util.graph.transformer.ConflictResolver.ScopeSelector

        getInstance
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • 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

        public java.lang.String chooseEffectiveScope​(java.util.Set<java.lang.String> scopes)
        Visible for testing. It chooses "widest" scope out of provided ones, unless system scope is present, in which case system scope is selected.