ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Foreman <Alexander.Fore...@morganstanley.com>
Subject Re: How to programaticly gather all the artifacts from an ivy file.
Date Fri, 09 Oct 2009 08:24:20 GMT
Great place to start.  If I find a nice solution I'll update here for
knowledge purposes.

Mitch:  Yes indeed I only want the projects artifacts and not its
dependencies, thanks.

Many thanks,

Alex



2009/10/8 Mitch Gitman <mgitman@gmail.com>:
> 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".
>

2009/10/8 Troy Self <tself@bbn.com>:
> There is an option when using ivy standalone to output the current classpath
> from an ivy.xml file:
>
> java -jar ivy.jar -confs runtime -cachepath classpath.txt
>
> I would start there in the source code and see how it achieves it. There are
> probably methods there that you can call directly.
>
> -- tBs
>
>> -----Original Message-----
>> From: Alex Foreman [mailto:Alexander.Foreman@morganstanley.com]
>> Sent: Thursday, October 08, 2009 10:51 AM
>> To: ivy-user@ant.apache.org
>> Subject: How to programaticly gather all the artifacts from an ivy file.
>>
>> 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
>
>
>



-- 
Alex Foreman

Mime
View raw message