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: Example of Recursive Delivery?
Date Sat, 20 Sep 2008 06:22:13 GMT
Mark,
recursive delivery is sg that is built in Ivy since its very early days but
isn't used that often AFAIK, so you can expect some rough edges.

First to answer the question about how can it be recursive, the idea is to
have one build file per module, call the recursive delivery in module X,
which in turn in its delivertarget execute the publish target *in the
dependency build script*. So you need to have a kind of well defined module
structure, and this is not intended to be used from a master build file as
you try.

About the dependency.organisation property, this is a limitation of the
feature, it's working only in the same organisation, but this can easily be
improved.

So if what you want is really a master build file driving your release
process, the ivy:buildlist is still the best way to go. The advantage of
recursive de livery is that it ensures you will get the delivered revision
of the dependency in your delivered ivy file. But as you have already
experienced, you may have to clean dust in the edges and maybe do some
improvements yourself (which you can obviously share with the community).
Another option is to use triggers to implement your own recursive delivery
process.

Xavier

On Fri, Sep 19, 2008 at 8:27 PM, Mark Melvin <mark.melvin@gmail.com> wrote:

> Can anyone comment on this at all?  If I have a module X that depends
> on Y, and Y depends on Z - how can I perform a resolve+deliver on X
> that goes down to Y and Z?  The best I can do is one level of
> dependencies, without getting the "antcall task calling its own parent
> target" error.  I must be doing something wrong.  Here is what works
> for one level of dependency:
>
>  <target name="deliver-all">
>        <property name="ivy.local.default.root" value="repository/local"/>
>        <property name="ivy.shared.default.root" value="repository/shared"/>
>        <property name="recursive.delivery.status" value="release"/>
>        <property name="recursive.delivery.version" value="1.1"/>
>    <ivy:resolve file="projects/console/ivy.xml" />
>    <ivy:deliver status="${recursive.delivery.status}"
> pubrevision="1.1-final"
> deliverpattern="distrib/ivy-[module]-[revision].xml" module="console"
> delivertarget="deliver-dep" />
>  </target>
>
>  <target name="deliver-dep">
>    <ivy:resolve inline="true" organisation="${ivy.organisation}"
> revision="${dependency.version}" module="${dependency.name}" />
>    <ivy:deliver module="${dependency.name}"
> deliverpattern="distrib/ivy-[module]-[revision].xml" />
>  </target>
>
> But the delivery of the dependency does not deliver the dependency's
> dependencies.  And I can't add a delivertarget attribute without
> getting an error (I was declaring delivertarget="deliver-dep").  So
> how do you normally implement recursive delivery?  (Note I am just
> hacking the multi-project sample) in an effort to get this to work.
>
> Finally, would it be reasonable to ask for a property of
> "dependency.organisation" to be set as well?  I don't think you can
> recursively resolve dependencies with a different organisation without
> it.
>
> Mark.
>
> On Thu, Sep 18, 2008 at 4:24 PM, Mark Melvin <mark.melvin@gmail.com>
> wrote:
> > Hi There,
> >
> > I posted earlier about trying to figure out a simple project
> > dependency list using ivy:buildlist hacks and after messing around it
> > seems that I may want a recursive ivy:deliver instead.  I have managed
> > to get this to work for one level of dependencies, but can you truly
> > get recursive delivery?  If I call my deliver wrapper, which declares
> > itself to be the delivertarget, I get the error "antcall task calling
> > its own parent target".  How can it be recursive if it can't call
> > itself?  I must be misunderstanding the docs.  Can someone provide an
> > example of this?
> >
> > Thanks,
> > Mark.
> >
>



-- 
Xavier Hanin - Independent Java Consultant
BordeauxJUG co leader - http://www.bordeauxjug.org/
Blogger - http://xhab.blogspot.com/
Apache Ivy Creator - http://ant.apache.org/ivy/

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