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: specify versions separate from dependencies
Date Wed, 27 Feb 2008 13:23:50 GMT
On Wed, Feb 27, 2008 at 11:53 AM, Harald Braumann <harry@unheit.net> wrote:

> On Wed, 27 Feb 2008 10:27:04 +0100
> "Xavier Hanin" <xavier.hanin@gmail.com> wrote:
>
> > On Tue, Feb 26, 2008 at 6:46 PM, Harald Braumann <harry@unheit.net>
> > wrote:
> >
> > > Hi,
> > >
> > > is it possible with ivy to specify the versions of dependencies
> > > separate from the actual dependency specification? Similar to the
> > > <dependencyMangement> section in maven's parent pom?
> >
> > There is no direct support for this currently in Ivy, what we usually
> > suggest is to use properties to specify the revisions, and define
> > these properties in a separate file. The result is very similar to
> > the dependency management feature.
>
> Fair enough, but like this I can only control direct dependencies.
> Maybe I should elaborate a bit more about what I want. Please note
> that I'm only familiar with Maven and only recently started to look
> into Ivy because I'm not completely satisfied with the former. So I
> might get the terminology wrong.
>
> Consider a project that is made up of multiple independent modules.
> Then there exists some uber-build, that has all the modules as
> dependencies and creates an installation package for the whole project.
>
> Many of the dependencies will be present in multiple modules, either
> directly or indirectly and very often with different versions. If I
> want to update some dependency, I don't want to go through all my
> modules and update there but I want to do it in a central place, for
> both direct and indirect dependencies.

You can control indirect dependencies in conflict by using the conflict
management section of your ivy file. But this work only with revisions in
conflict. So there's currently no way in Ivy to override the version of a
dependency which is not in conflict and on which your module does not
depend. I didn't know that was possible with maven2: the
dependencyManagement documentation is not clear on this subject. But now
that I better see what is possible in maven, we can consider that this is an
incompatibility we have with maven2, and a missing feature in terms of
dependency management flexibility (no alternative way to do it as I thought
we had with properties). So we should find a way to implement this for Ivy
2.0 final.

Could you open an issue about that?

Xavier


>
>
> The only solution I see so far is to use a separate repository for the
> project. But then I'd have to copy the stuff in there manually from
> other repositories. Certainly doable, but not as nice as just
> specifying the versions in a file or some such. Compare this to the
> Debian repository, where you have one pool with all packages and files
> that specify the actual versions that go into a release (stable,
> unstable, sid, experimental). It's kind of a partitioning of a central
> repository.
>
> Please note that this problem also exists for single modules. Lets say
> I have to dependencies, that both depend on foo. Now I update one
> dependency, the new version of which depends on a new version of foo.
> But I don't want to update foo if it's not necessary. Again I would
> like to be able to specify the versions in a single place.
>
> I would be quite surprised if others didn't have the same problems
> with randomly changing versions of indirect dependencies.
>
> Regards,
> harry
>



-- 
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/

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