org.apache.ivy.plugins.conflict

Class LatestCompatibleConflictManager

public class LatestCompatibleConflictManager extends LatestConflictManager

This conflict manager can be used to allow only compatible dependencies to be used together (like the strict conflict manager), but it has the advantage of using a best effort algorithm to find a set of compatible dependencies, even if it requires stepping back to older revisions (as long as they are in the set of compatibility).

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.

Constructor Summary
LatestCompatibleConflictManager()
LatestCompatibleConflictManager(String name, LatestStrategy strategy)
Method Summary
voidhandleAllBlacklistedRevisions(DependencyDescriptor dd, Collection foundBlacklisted)
protected voidhandleUnsolvableConflict(IvyNode parent, Collection conflicts, IvyNode node1, IvyNode node2)
CollectionresolveConflicts(IvyNode parent, Collection conflicts)
StringtoString()

Constructor Detail

LatestCompatibleConflictManager

public LatestCompatibleConflictManager()

LatestCompatibleConflictManager

public LatestCompatibleConflictManager(String name, LatestStrategy strategy)

Method Detail

handleAllBlacklistedRevisions

public void handleAllBlacklistedRevisions(DependencyDescriptor dd, Collection foundBlacklisted)

handleUnsolvableConflict

protected void handleUnsolvableConflict(IvyNode parent, Collection conflicts, IvyNode node1, IvyNode node2)

resolveConflicts

public Collection resolveConflicts(IvyNode parent, Collection conflicts)

toString

public String toString()