ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xavier Hanin" <xavier.ha...@gmail.com>
Subject Re: Get exact revision for exact library
Date Tue, 10 Apr 2007 08:49:28 GMT
On 4/9/07, Anton Stalnuhhin <Anton.Stalnuhhin@webmedia.ee> wrote:
>
> From: Jing Xue [mailto:jingxue@digizenstudio.com]
> Sent: E 09.04.2007 17:29
> To: ivy-user@incubator.apache.org
> Subject: Re: Get exact revision for exact library
>
> >> I'm sorry, if it is simple, but I couldn't find the answer on it.
> >> Situation is that I have some modules that depends on C rev="2", but
> >> I need to get C rev="1".
> >> So I just add into ivy.xml dependency for C rev="1". As I
> >> understand, there is a conflict, so
> >> by default Ivy takes latest-revision. How can I configure conflicts,
> >>  so that if there is a conflict
> >> between C rev="ANY" and C rev="1", Ivy takes C rev="1"?
> >
> >Hi Anton,
> >
> >I'm fairly new to ivy, so just a couple of thoughts: you can probably
> >either exclude C rev.2 in the other dependency, or use a force
> >attribute on the C rev.1 dependency.  There is also some conflict
> >manager types that can be configured to resolve conflicts the way you
> >wanted - which is probably a universal solution but can be an overkill
> >depending on your situation.
> >
> >HTH.
> >--
> >Jing Xue
>
> Well, I thought about all of these solutions. Excluding is very annoying
> here. Project is big. It is not comfortable.


I don't think excluding is the best solution, but the latest version
supports module wide exclusion which can help. You can also comment on the
related issue if you think that settings wide exclusion could help:
https://issues.apache.org/jira/browse/IVY-431

Force attribute didn't help, I tried it.


Force is only an indication for the conflict manager, and it can be actually
used or not depending on the conflict manager used. But if you use the
default conflict manager (latest-revision), it should work in your
situation. Even if you'd prefer another solution (like a new conflict
manager), it would be nice to see if you've found a bug or if it's only a
settings problem. Could you give more details on what you did (your ivy
files and your settings).

I thought there is some good and pretty solution with conflict management...


There is a solution with conflict management, but as Jing said, it may be
overkill or not depending on the frequency of your situation. If you
frequently need a module to be sure that the revision of a dependency it
will get is X whatever the conflict in dependencies occur, the force
attribute should be the easiest solution, since it has been designed for
that. OTOH, if your problem should better be considered for all your
modules, and you don't want to use the force attribute everywhere, then
using a custom conflict manager should be the best solution. Maybe what you
need is a 'nearest definition' conflict manager. There is no such conflict
manager for the moment, but writing one is possible, and could be
interesting for the Ivy community since it's the way maven 2 deals with
conflicts. So if you think it could help you, at least open a JIRA issue for
that, and if you implement it we would appreciate a patch :-)

- Xavier

----------------------------------------
> Anton Stalnuhhin [5248202]
> antons@webmedia.ee
>
>
>
>
>
>
>


-- 
Learn Ivy at ApacheCon: http://www.eu.apachecon.com/
Manage your dependencies with Ivy!
http://incubator.apache.org/ivy/

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