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: submodule dependencies
Date Mon, 25 Jun 2007 11:00:05 GMT
On 6/25/07, Gilles Scokart <gscokart@gmail.com> wrote:
>
> Really?  I guess that could be done for the jars, but not for the
> ivy.xml files.  Indeed, the ivy file must be read in order to get the
> extra fields values.  So the pattern of your ivy file can not be based
> on those values.
>
> Am I wrong?


I think so :-) If you put your extra attribute on the dependency element,
Ivy has enough information to build the pattern even to get the ivy files.
If it doesn't work it's a bug for which we would have a failing junit test
(ResolveTest#testExtraAttributes()).

Xavier

Gilles
>
> 2007/6/25, Xavier Hanin <xavier.hanin@gmail.com>:
> > On 6/22/07, Scott Goldstein <sgoldstein@apache.org> wrote:
> > >
> > > I have a use case in which a product contains a number of submodules
> which
> > > can be used individually.  So, in essence, the submodules are
> identified by:
> > >
> > >   organization/product/revision/submodule
> > >
> > >   It doesn't appear that Ivy has such a notion in its depedency
> resolution
> > > mechanism.  Am I correct?
> > >
> > >   I could replace one of these tokens with the "branch" element, but I
> > > don't think that this was the intended purpose.
> > >
> > >   I suppose another approach, here, would be to write a custom
> > > DependencyResolver in which for the module, I would specify something
> like
> > > "product:submodule" and my resolver would split these up and apply
> them to a
> > > pattern.
> > >
> > >   Are there any other approaches that would make more sense?
> >
> >
> > Yes, I think you should better use extra attributes in this case, they
> are
> > meant for that and very easy to use. All you have to do is declare a
> > submodule attribute in your info element of your ivy files, and in your
> > dependency elements. Then you can use this submodule as a token in your
> > patterns.
> >
> > HTH,
> >
> > Xavier
> >
> >   Thanks.
> > >
> > >   Scott
> > >
> >
> >
> >
> > --
> > Xavier Hanin - Independent Java Consultant
> > Manage your dependencies with Ivy!
> > http://incubator.apache.org/ivy/
> >
>



-- 
Xavier Hanin - Independent Java Consultant
Manage your dependencies with Ivy!
http://incubator.apache.org/ivy/

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