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 16:41:43 GMT
On Wed, Feb 27, 2008 at 5:33 PM, Harald Braumann <harry@unheit.net> wrote:

> On Wed, 27 Feb 2008 16:50:43 +0100
> "Xavier Hanin" <xavier.hanin@gmail.com> wrote:
>
> > BTW, I think that changing the dependency resolution algorithm in a
> > 2.0.xrelease is pretty strange. This can easily break builds, which I
> > wouldn't
> > suspect when upgrading on a 2.0.x stream.
> Well, you're not alone there.
>
> > > Maybe similar to a virtual module? It could then be specified by
> > > org/name/etc. just like dependencies.
> >
> > What do you mean by similar to a virtual module? Virtual module in
> > Ivy has a specific sense: it's a module which doesn't publish any
> > artifact. But maybe you're not referencing to this concept.
>
> I am. I just wanted to suggest that it shouldn't be a settings file but
> something like a module file.
>
> > Personnally I was just thinking about something very similar to maven
> > dependency management feature, with slight adaptation to Ivy syntax.
> >
> > Something like:
> > <ivy-module version="2.0">
> >   <info ... />
> >   <dependencies>
> >   </dependencies>
> >   <dependencyManagement>
> >     <dependency org="foo" name="bar" rev="1.0"  />
> >   </dependencyManagement>
> > </ivy-module>
>
> So in this case foo-bar-1.0 could actually be a virtual module, but as
> it is specified under dependencyManagement, it wouldn't pull in the
> dependencies but just override the versions.

I'm not sure of what you mean. foo#bar is module, on which we suppose the
module defined with the ivy.xml define above  depends indirectly. Let's
suppose we have foo#baz;2.0 -> foo#bar;1.0.1. With this ivy.xml:
<ivy-module version="2.0">
  <info organisation="acme" name="mymodule"  />
  <dependencies>
    <dependency org="foo" name="baz" rev="2.0"  />
  </dependencies>
  <dependencyManagement>
    <dependency org="foo" name="bar" rev="1.0"  />
  </dependencyManagement>
</ivy-module>

Ivy would resolve the dependency closure as: { foo#baz;2.0 , foo#bar;1.0 }
instead of { foo#baz;2.0 , foo#bar;1.0.1 }, because of the
dependencyManagement section. This is very similar to how Maven handle this,
right?

Xavier


>
> > Maybe we could allow to have wildcards in organization or module
> > names, using a matcher attribute to specify which matcher to use:
> >   <dependencyManagement>
> >     <dependency org="foo" name="bar-*" rev="1.0" matcher="glob"  />
> >   </dependencyManagement>
> >
> >
> > >
> > > > Could you open an issue about that?
> > >
> > > Of course I can also open an issue now so it won't be forgotten, if
> > > so desired.
> >
> > Opening the issue now does not require much understanding of Ivy
> > concepts. Since Ivy is supposed to be compatible with maven2, you can
> > first open a simple bug stating that Ivy does not support
> > dependencyManagement feature of maven2 with transitive dependencies.
> > Then later you (or somebody else) can open an issue about how we
> > could provide a similar feature in Ivy files, and link the two
> > issues.
>
> OK, will do.
>
> > Issues are editable, commentable and a very good way to track
> > what should/can be done. And when you open an issue, it's easier for
> > us to track that someone in the community asked for it, rather than
> > thinking it's something that comes out of the committer team. And
> > don't worry, you will never be culprit of anything, it's our "job" as
> > Ivy committers to make sure things are implemented with whole
> > consistency in mind. Well, it's what we try to do at least :-)
> >
> > Xavier
>
> 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