Interface ConfigurableVersionSelector.SelectionStrategy

    • Method Detail

      • isBetter

        boolean isBetter​(ConflictResolver.ConflictItem candidate,
                         ConflictResolver.ConflictItem winner)
        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,
                                                             java.util.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