ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mitch Gitman <mgit...@gmail.com>
Subject Re: How to programaticly gather all the artifacts from an ivy file.
Date Thu, 08 Oct 2009 15:56:32 GMT
The standard way to gather the artifacts for a given Ivy conf is to invoke
the following Ant tasks in sequence:
1. ivy:resolve
2. ivy:cachefileset

If you want to accomplish the same programmatically, I would suggest looking
into how you can leverage these existing tasks or the top-level APIs they
call.

By the way, it sounds like you only want the artifacts within the module
itself, and not the artifacts belonging to its dependencies. In that case,
ivy:resolve should have transitive="false".

On Thu, Oct 8, 2009 at 7:51 AM, Alex Foreman <
Alexander.Foreman@morganstanley.com> wrote:

> Hey Guys,
>
> I have a runscript generator which is driven by ivy.
> Currently however I am only including the main jar my build creates.
>
> If someone has a artifact list like this:
>
> <artifact name="prod" ext="jar" type="jar" conf="runtime" />
> <artifact name="prodstandalone" ext="jar" type="jar" conf="standalone" />
>
> <artifact name="qa" ext="jar" type="jar" conf="qa-runtime" />
>
> <artifact name="prod-spring" ext="xml" type="xml" />
> <artifact name="qa-spring" ext="xml" type="xml" />
>
> I wish to be able to use Ivy to say for my ivy.xml tell me all
> artifacts that are in 'x' config.
> This way I can setup my classpath on the fly and be completely driven
> from Ivy.xml
>
> Is there any easy way to do this.  I'm not to keen on writing a
> separate xml parser to gather this information which I would presume I
> should have access to already.
>
> Many thanks in advance!
>
>
> --
> Alex Foreman
>

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