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 18:32:47 GMT
On Wed, 27 Feb 2008 18:51:14 +0100
"Xavier Hanin" <xavier.hanin@gmail.com> wrote:

> On Wed, Feb 27, 2008 at 6:11 PM, Harald Braumann <harry@unheit.net>
> wrote:
> 
> > Sorry, I misunderstood you before. You put the overrides in the ivy
> > file directly. In this case you're right, of course. I thought of
> > foo#bar more like the parent pom in maven nomenclature.
> >
> > In your proposal it would be nice, if dependencyManagement would be
> > resolved recursively. This would help multi-module projects, where
> > you want to define versions centrally in a single file. You could
> > then specify a module without publications (thus I thought of a
> > virtual module) and with only a dependencyMangement section. Like
> > so:
> >
> > <ivy-module version="2.0">
> >   <info organisation="acme" name="myproject"  />
> >   <dependencies>
> >  </dependencies>
> >  <dependencyManagement>
> >    <dependency org="foo" name="bar" rev="1.0"  />
> >     <dependency org="foo" name="baz" rev="1.0"  />
> >  </dependencyManagement>
> > </ivy-module>
> >
> > <ivy-module version="2.0">
> >   <info organisation="acme" name="mymodule1"  />
> >  <dependencies>
> >     ...
> >  </dependencies>
> >  <dependencyManagement>
> >    <dependency org="acme" name="myproject"
> > rev="latest.integration"  /> </dependencyManagement>
> > </ivy-module>
> >
> > <ivy-module version="2.0">
> >   <info organisation="acme" name="mymodule2"  />
> >  <dependencies>
> >     ...
> >  </dependencies>
> >  <dependencyManagement>
> >    <dependency org="acme" name="myproject"
> > rev="latest.integration"  /> </dependencyManagement>
> > </ivy-module>
> >
> > And thus both, mymodule1 and mymodule2, would use the same versions
> > of foo#bar and foo#baz.
> 
> I'm not sure to follow you. In acme#myproject, the
> dependencyManagement section is used to override dependencies, ok.
> But then in acme#mymodule(1|2) it's used (with the same syntax) as a
> kind of import or include mechanism, right? How do we distinguish
> between the two?
In the same way as it is done with dependencies. If mymodule1 depends
on foo#bar, it uses foo#bar and at the same time includes all the
dependencies of foo#bar, recursively. Similarly, mymodule1 overrides
any dependency of acme#myproject (acme#myproject is just meant as a
helper module to specify overrides in a single file, so its probably
not useful for any package to really depend on it) and additionally
includes all overrides from acme#myproject. 

harry

Mime
View raw message