public final class NearestVersionSelector extends ConflictResolver.VersionSelector
ConflictResolver that resolves version conflicts using a nearest-wins
strategy. If there is no single node that satisfies all encountered version ranges, the selector will fail.| Constructor and Description |
|---|
NearestVersionSelector()
Creates a new instance of this version selector.
|
| Modifier and Type | Method and Description |
|---|---|
void |
selectVersion(ConflictResolver.ConflictContext context)
Determines the winning node among conflicting dependencies.
|
getInstancepublic NearestVersionSelector()
public void selectVersion(ConflictResolver.ConflictContext context) throws org.eclipse.aether.RepositoryException
ConflictResolver.VersionSelectorConflictResolver.ConflictContext.getItems(), inspect ConflictResolver.ConflictItem.getNode() and eventually call
ConflictResolver.ConflictContext.setWinner(ConflictResolver.ConflictItem) to deliver the winner. Failure to select a
winner will automatically fail the entire conflict resolution.selectVersion in class ConflictResolver.VersionSelectorcontext - The conflict context, must not be null.org.eclipse.aether.RepositoryException - If the version selection failed.Copyright © 2010-2015 The Eclipse Foundation. All Rights Reserved.