ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Haberman <>
Subject changing pattern in BasicResolver
Date Tue, 03 Aug 2010 21:33:21 GMT

I setup a chain of two ibiblio resolvers:


And I have a new SNAPSHOT in local-m2 that I want to take precedence
over the shared-m2. (Assuming it really is the newest--otherwise
shared-m2 should win).

The chain resolver docs assert it will go over each resolver and
pick the best/latest match, but this is not happening.

The problem is in BasicResolver.getDependency:

    public ResolvedModuleRevision getDependency(DependencyDescriptor dd, ResolveData data)
            throws ParseException {
        IvyContext context = IvyContext.pushNewCopyContext();
        try {
            ResolvedModuleRevision mr = data.getCurrentResolvedModuleRevision();
            if (mr != null) {
                if (shouldReturnResolvedModule(dd, mr)) {
                    return mr;

shouldReturnResolvedModule ignores changingPattern, so returns true,
and the local-m2 repo is never even checked for a newer snapshot.

To me, if an artifact matches the changing pattern, it should be checked
for the latest in all resolvers, not just the first one found.

Does this make sense? I'll file a bug if so.


View raw message