Class JavaScopeSelector
- java.lang.Object
-
- org.eclipse.aether.util.graph.transformer.ConflictResolver.ScopeSelector
-
- org.eclipse.aether.util.graph.transformer.JavaScopeSelector
-
public final class JavaScopeSelector extends ConflictResolver.ScopeSelector
A scope selector for use withConflictResolverthat supports the scopes fromJavaScopes. 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.
-
-
Constructor Summary
Constructors Constructor Description JavaScopeSelector()Creates a new instance of this scope selector.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.lang.StringchooseEffectiveScope(java.util.Collection<ConflictResolver.ConflictItem> items)private java.lang.StringchooseEffectiveScope(java.util.Set<java.lang.String> scopes)voidselectScope(ConflictResolver.ConflictContext context)Determines the effective scope of the dependency given byConflictResolver.ConflictContext.getWinner().-
Methods inherited from class org.eclipse.aether.util.graph.transformer.ConflictResolver.ScopeSelector
getInstance
-
-
-
-
Method Detail
-
selectScope
public void selectScope(ConflictResolver.ConflictContext context) throws RepositoryException
Description copied from class:ConflictResolver.ScopeSelectorDetermines the effective scope of the dependency given byConflictResolver.ConflictContext.getWinner(). Implementations will usually iterateConflictResolver.ConflictContext.getItems(), inspectConflictResolver.ConflictItem.getScopes()and eventually callConflictResolver.ConflictContext.setScope(String)to deliver the effective scope.- Specified by:
selectScopein classConflictResolver.ScopeSelector- Parameters:
context- The conflict context, must not benull.- Throws:
RepositoryException- If the scope selection failed.
-
chooseEffectiveScope
private java.lang.String chooseEffectiveScope(java.util.Collection<ConflictResolver.ConflictItem> items)
-
chooseEffectiveScope
private java.lang.String chooseEffectiveScope(java.util.Set<java.lang.String> scopes)
-
-