Interface ConfigurableVersionSelector.SelectionStrategy

All Known Implementing Classes:
ConfigurableVersionSelector.Highest, ConfigurableVersionSelector.MajorVersionConvergence, ConfigurableVersionSelector.Nearest, ConfigurableVersionSelector.VersionConvergence
Enclosing class:
ConfigurableVersionSelector

The strategy how "winner" is being selected.
  • Method Details

    • isBetter

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

    • winnerSelected

      default ConflictResolver.ConflictItem winnerSelected(ConflictResolver.ConflictItem winner, Collection<ConflictResolver.ConflictItem> candidates, ConflictResolver.ConflictContext context) throws org.eclipse.aether.collection.UnsolvableVersionConflictException
      Method invoked at version selection end, just before version selector returns. Note: winner may be null, while the rest of parameters cannot. The parameter candidates contains all the "considered candidates", dependencies that fulfil all constraints, if present. The context on the other hand contains all items participating in conflict.

      This method by default just returns the passed in winner, but can do much more.

      Throws:
      org.eclipse.aether.collection.UnsolvableVersionConflictException