Marc, doing everything at once at init sounds a bit heavyweight and
monolithic. Imagine you're resolving and retrieving 15 different task
libraries when all you need for a given build is two or three.

Instead, I would obtain tasks on an as-needed basis. So for example, the
moment you need a particular task is the moment you do:

   1. ivy:resolve
   2. ivy:retrieve
   3. taskdef

But this approach also presumes that you've created more fine-grained Ivy
confs that correspond to your different optional tasks.

BTW, when you're using two different Ivy module descriptors in a build, make
sure to specify the file attribute on the ivy:resolve each time so Ivy
doesn't use the wrong one. Good habit anyway, as far as I'm concerned.

On Wed, Mar 10, 2010 at 12:46 PM, marcdb <mdeb...@gmail.com> wrote:

>
> Hi Mitch,
>
> Thanks for your suggestion. I'll try to do the following:
> In my central build file (used for building all projects), I will create an
> init-target which will:
> * execute an ivy:init
> * do an ivy:retrieve using that common ivy.xml file for the dependencies of
> my build-system itself. The appropriate versions of the jars that I need to
> create my ant-tasks will then be retrieved in an appropriate directory for
> my build-system.
> * call the <taskdef> task in ant, to create/define the additional ant-tasks
> that I need.
>
> I hope this will work. It actually seems simplier than I first thought
> :thinking:
>
> Regards,
> Marc
>
>
> --
> View this message in context:
> http://old.nabble.com/Use-ivy-dependencies-to-create-ant-tasks-tp27850372p27855533.html
> Sent from the ivy-user mailing list archive at Nabble.com.
>
>

Reply via email to