public class LatestCompatibleConflictManager extends LatestConflictManager
Here is an example of what this conflict manager is able to do:
Available Modules:
#A;2->{ #B;[1.0,1.5] #C;[2.0,2.5] }
#B;1.4->#D;1.5
#B;1.5->#D;2.0
#C;2.5->#D;[1.0,1.6]
Result: #B;1.4, #C;2.5, #D;1.5
DetailsThe conflict manager finds that the latest matching version of #B (1.5) depends on a version of #D incompatible with what is expected by the latest matching version of #C. Hence the conflict manager blacklists #B;1.5, and the version range [1.0,1.5] is resolved again to end up with #B;1.4 which depends on #D;1.5, which is fine to work with #C;2.5.
LatestConflictManager.IvyNodeArtifactInfo, LatestConflictManager.NoConflictResolvedYetException| Constructor and Description |
|---|
LatestCompatibleConflictManager() |
LatestCompatibleConflictManager(java.lang.String name,
LatestStrategy strategy) |
| Modifier and Type | Method and Description |
|---|---|
void |
handleAllBlacklistedRevisions(DependencyDescriptor dd,
java.util.Collection<ModuleRevisionId> foundBlacklisted)
Method called when all revisions available for a version constraint have been blacklisted,
and thus the dependency can't be resolved.
|
protected void |
handleUnsolvableConflict(IvyNode parent,
java.util.Collection<IvyNode> conflicts,
IvyNode node1,
IvyNode node2) |
java.util.Collection<IvyNode> |
resolveConflicts(IvyNode parent,
java.util.Collection<IvyNode> conflicts)
Resolves the eventual conflicts found in the given collection of IvyNode.
|
java.lang.String |
toString() |
getStrategy, setLatest, setStrategy, toArtifactInfogetName, getSettings, setName, setSettingspublic LatestCompatibleConflictManager()
public LatestCompatibleConflictManager(java.lang.String name,
LatestStrategy strategy)
public java.util.Collection<IvyNode> resolveConflicts(IvyNode parent, java.util.Collection<IvyNode> conflicts)
ConflictManagerresolveConflicts in interface ConflictManagerresolveConflicts in class LatestConflictManagerparent - the ivy node parent for which the conflict is to be resolvedconflicts - the collection of IvyNode to check for conflictsprotected void handleUnsolvableConflict(IvyNode parent, java.util.Collection<IvyNode> conflicts, IvyNode node1, IvyNode node2)
public void handleAllBlacklistedRevisions(DependencyDescriptor dd, java.util.Collection<ModuleRevisionId> foundBlacklisted)
ConflictManagerThis will never happen if the conflict manager doesn't blacklist any module, so providing an empty implementation in this case is fine.
handleAllBlacklistedRevisions in interface ConflictManagerhandleAllBlacklistedRevisions in class AbstractConflictManagerdd - the dependency descriptor for which all revisions are blacklisted.foundBlacklisted - the list of all ModuleRevisionId found which are blacklistedpublic java.lang.String toString()
toString in class LatestConflictManagerCopyright ©2007-2022 The Apache Software Foundation, Licensed under Apache License, Version 2.0.