ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Burcher, Greg" <>
Subject Need StrictConflictManager to respect force
Date Fri, 17 Dec 2010 19:53:24 GMT
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

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message