Class ConfigurableVersionSelector.Highest
- java.lang.Object
-
- org.eclipse.aether.util.graph.transformer.ConfigurableVersionSelector.Highest
-
- All Implemented Interfaces:
ConfigurableVersionSelector.SelectionStrategy
- Enclosing class:
- ConfigurableVersionSelector
public static class ConfigurableVersionSelector.Highest extends java.lang.Object implements ConfigurableVersionSelector.SelectionStrategy
Selection strategy that selects "highest" version.If winner is level 1 or less (is direct dependency of root), it is kept as winner (as in "real life" it means dependency is enlisted in POM). Then candidate is checked for same thing, and selected if it is direct dependency. Then if both, candidate and winner carries same version (so are same GACEV, same artifact) then "nearest" is selected. Finally, if none of above, higher version is selected out of two.
-
-
Constructor Summary
Constructors Constructor Description Highest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisBetter(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 Detail
-
Highest
public Highest()
-
-
Method Detail
-
isBetter
public boolean isBetter(ConflictResolver.ConflictItem candidate, ConflictResolver.ConflictItem winner)
Description copied from interface:ConfigurableVersionSelector.SelectionStrategyInvoked 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
candidateis "considered" (fits any constraint in effect, if any).- Specified by:
isBetterin interfaceConfigurableVersionSelector.SelectionStrategy
-
-