ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maarten Coene <>
Subject Re: Need StrictConflictManager to respect force
Date Mon, 20 Dec 2010 12:54:40 GMT
If possible, could you create a JIRA issue for this and attach a patch file to 


----- Original Message ----
From: "Burcher, Greg" <>
Sent: Fri, December 17, 2010 8:53:24 PM
Subject: Need StrictConflictManager to respect force

Neither StrictConflictManager nor LatestCompatibleConflictManager appear
to respect the 'force="true" attribute value on dependency. We would
like to have the behavior of StrictConflictManager with the enhancement
that it would recognize the dependency force attribute as an override to
strict conflict resolution. This appears to be fairly easy to code by
extending StrictConflictManager something like this:

public class StrictPlusForceConflictManager extends
StrictConflictManager {


    public Collection resolveConflicts(IvyNode parent, Collection
conflicts) {


         * Before using algorithm of StrictConflictManager,

         * first check for "force" revision  using code from


        if (conflicts.size() < 2) {

            return conflicts;


        for (Iterator iter = conflicts.iterator(); iter.hasNext();) {

            IvyNode node = (IvyNode);

            DependencyDescriptor dd =

            if (dd != null && dd.isForce()

parent.getResolvedId().equals(dd.getParentRevisionId())) {

                return Collections.singleton(node);



        return super.resolveConflicts(parent, conflicts);



We have not yet tested because it is a non-trivial task to create our
own ConflictManager subclass, configure to ivy, and deploy the compiled
class into an appropriate classpath for our build process. For now we
are working around this issue by using a strategy based on the
dependency exclude attribute. However, this strategy is not as clean for
us as it would be to use the dependency force attribute.

Is it possible that combined strict/force conflict management support
could be added to Ivy? Or maybe someone can suggest a strategy to
achieve something similar using support already provided?


Greg Burcher


View raw message