ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harald Braumann <ha...@unheit.net>
Subject Re: specify versions separate from dependencies
Date Wed, 27 Feb 2008 15:03:33 GMT
On Wed, 27 Feb 2008 14:23:50 +0100
"Xavier Hanin" <xavier.hanin@gmail.com> wrote:

> 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 semantics of the dependencyManagement section was changed in
2.0.6 so that it can also override transitive dependencies [1].

> the dependencyManagement documentation is not clear on this
> subject. 

Well, documentation is one the points why I'm not really satisfied with
Maven. But in this case I have to jump to maven's defence: "In addition,
the version and scope of artifacts which are incorporated from
transitive dependencies may also be controlled by specifying them in a
dependency management section." [2]

> 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.

Maybe similar to a virtual module? It could then be specified by
org/name/etc. just like dependencies.
 
> Could you open an issue about that?

Well, I could, but I'm not sure if I'm the right person to do so. As I
said, I don't know ivy that well, yet, and so I might not be able to
express myself properly. Also, what I've noticed about maven is, that
someone said "hey, this would be a cool feature" and then it was
implemented without having a broader concept behind. And so the way
dependencies are resolved changed in subtle ways from version to
version. I wouldn't want to be the culprit for this to happen in ivy.

I'm currently in the process of setting up a project using ivy so in
the course of the next view days I should get a better understanding of
ivy's concepts. I will come back to this issue.

Of course I can also open an issue now so it won't be forgotten, if so
desired.

harry

[1] http://jira.codehaus.org/browse/MNG-1577
[2] http://maven.apache.org/pom.html#Dependency_Management

Mime
View raw message