ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johannes Stamminger <>
Subject Re: accessing project dependencies in custom ant task
Date Mon, 15 Oct 2007 07:13:12 GMT


On Saturday 13 October 2007, Torsten Curdt wrote:
> In a custom ant task I would like to get the dependencies (and the
> paths to the artifacts) of the project as defined in the ivy.xml.
> When writing a maven mojo =:-o I would use
>    Set projectArtifacts = getProject().getArtifacts();
> How could I get the dependencies from ivy in my ant task?

After a resolve (by way of ivy ant task) you may ask ant to provide you the 
Ivy instance with:
  final Ivy ivy = (Ivy) antProject.getReference("ivy.instance");

That one you can interate e.g. the IvyNodes on. But you should have a look to 
the sources (or in my case most understandable was to debug through it) to 
see, how to access the informations needed for your purposes.

Johannes Stamminger

This email (including any attachments) may contain confidential and/or privileged information
or information otherwise protected from disclosure. If you are not the intended recipient,
please notify the sender immediately, do not copy this message or any attachments and do not
use it for any purpose or disclose its content to any person, but delete this message and
any attachments from your system. Astrium disclaims any and all liability if this email transmission
was virus corrupted, altered or falsified.
Astrium GmbH Vorsitzender des Aufsichtsrates: Thomas Mueller - Geschaeftsfuehrung: Evert Dudok
(Vorsitzender), Dr. Reinhold Lutz, Pablo Salame Fischer
Sitz der Gesellschaft: Muenchen - Registergericht: Amtsgericht Muenchen, HRB Nr. 107 647

View raw message