Class ConfigurableVersionSelector.Nearest
java.lang.Object
org.eclipse.aether.util.graph.transformer.ConfigurableVersionSelector.Nearest
- All Implemented Interfaces:
ConfigurableVersionSelector.SelectionStrategy
- Enclosing class:
ConfigurableVersionSelector
public static class ConfigurableVersionSelector.Nearest
extends Object
implements ConfigurableVersionSelector.SelectionStrategy
Selection strategy that selects "nearest" (to the root) version.
This is the "classic" Maven strategy.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isBetter
(ConflictResolver.ConflictItem candidate, ConflictResolver.ConflictItem winner) Invoked for every "candidate" when winner is already set (very first candidate is set as winner).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.aether.util.graph.transformer.ConfigurableVersionSelector.SelectionStrategy
winnerSelected
-
Constructor Details
-
Nearest
public Nearest()
-
-
Method Details
-
isBetter
public boolean isBetter(ConflictResolver.ConflictItem candidate, ConflictResolver.ConflictItem winner) Description copied from interface:ConfigurableVersionSelector.SelectionStrategy
Invoked for every "candidate" when winner is already set (very first candidate is set as winner).This method should determine is candidate "better" or not and should replace current winner. This method is invoked whenever
candidate
is "considered" (fits any constraint in effect, if any).- Specified by:
isBetter
in interfaceConfigurableVersionSelector.SelectionStrategy
-