On 3/29/07, Gilles Scokart <[EMAIL PROTECTED]> wrote:
> -----Original Message----- > From: Xavier Hanin [mailto:[EMAIL PROTECTED] > Sent: jeudi 29 mars 2007 11:07 > To: [email protected] > Subject: Re: IvyPostResolve Task question > > On 3/29/07, Gilles Scokart <[EMAIL PROTECTED]> wrote: > > > > And what if you depend (directly or indirectly) on 2 different versions > of > > the same module in two different confs? > > > It depends if these two configurations fall into one root module conf or > not. If they are in two separate root module conf (by root I mean the > module > for which the dependency resolution is being done), then no problem, there > is no conflict, and you will get one version in one conf and another > version > in the other conf. Does it means that if you do <retrieve conf="X,Y"> you can end up with two versions on the same module?
Yes, you can. But you can also even if you resolve only one conf! It depends on your conflict manager settings, if you use the 'all' conflict manager which selects all revision and evict none. The case of different root module confs, you can have different versions of the same module, even if your conflict manager is always selecting only revision, simply because Ivy resolves root module conf in isolation, so the different versions won't even be considered in conflict... at resolve time. Because depending on your retrieve pattern, several artifacts may end up at the same location (if you do not include [conf] nor [revision] in your retrieve pattern for instance), then the retrieve task will do its own conflict resolution, which doesn't rely on conflict manager but on a poor and hard coded conflict management (see RetrieveEngine#getConflictResolvingPolicy). This could be improved bu nobody ever complained about it :-) HTH, - Xavier Gilles
