ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jing Xue <>
Subject Re: conditional resolving
Date Tue, 20 Nov 2007 01:04:59 GMT
On Mon, Nov 19, 2007 at 10:56:36PM +0100, Xavier Hanin wrote:
> This use case is very interesting, and a tricky one. I don't see any way to
> express this cleanly and concisely with current Ivy version. You could use a
> custom resolver to handle this very specific logic, but I'm not the sure the
> idea is satisfying.

This could be interesting. I suppose since a resolver has access to the current
resolution map, it could at least theoretically make a "stateful"
decision. One potential caveat though is that, IIUC, when two modules
aren't depending on one another, the order of them being resolved is
undefined. So the custom resolver may be asked to make the decision
before the relevant data is available.

> Another possible solution is to use two configurations in you module, one
> for spring 2 and one for spring 2.5. Since I don't recommend declaring a
> dependency on the same module twice with different revisions in the same
> module (it happens to mostly work, but is not actually supported and subject
> to some bugs), what could be done is define two virtual modules (no
> publications), one for spring 2, and another for spring 2.5, both having
> different names. Then you make your module depend on one of them in one conf
> and on the other in the other conf. But then you loose the advantage of
> conflict resolution for this virtual module at least.

Hmm... I hadn't thought of virtual modules. But as you pointed out, this
can get complicated, because not only my module depends on these spring
modules, so do some of the 3rd party tools we use.

> All of this depends
> also on who you would like to take the decision of which version of spring
> to use. Is it a direct client of your module (in which case the
> configurations solution may be interesting) or a transitive client?

It's most likely a direct client that will make the decision.

Jing Xue

> Xavier

View raw message