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.fore...@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