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, toArtifactInfo
getName, getSettings, setName, setSettings
public LatestCompatibleConflictManager()
public LatestCompatibleConflictManager(java.lang.String name, LatestStrategy strategy)
public java.util.Collection<IvyNode> resolveConflicts(IvyNode parent, java.util.Collection<IvyNode> conflicts)
ConflictManager
resolveConflicts
in interface ConflictManager
resolveConflicts
in class LatestConflictManager
parent
- 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)
ConflictManager
This 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 ConflictManager
handleAllBlacklistedRevisions
in class AbstractConflictManager
dd
- 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 LatestConflictManager
Copyright ©2007-2022 The Apache Software Foundation, Licensed under Apache License, Version 2.0.