I figured out how to make it work, with the help of my colleague. And Gilles's reply also helped.
Scenario: To run task A, B, C, etc, only a common set of jars/zips (the set D) is needed; to run task X, a large number of jars/zips (the set Y) is needed. In most cases, task A, B, C, etc will be run. And in very rare cases, task X needs to be performed. We don't want ivy to resolve (and may retrieve) the jars/zips in set D and Y every time we run the ant task, due to our internal network latency. Solution: Two configurations (commons and demanding) are defined in the ivy file, and the conf attribute of each ivy retrieve tag in the build file is specified. Attached is the example, based on ivy 1.4.1. I think it may be a good candidate to be added to the ivy tutorial examples. John Wu -----Original Message----- From: Gilles Scokart [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 22, 2007 3:34 AM To: [email protected] Subject: RE: HOWTO - Resolve dependencies on demand Could you explain a little bit more what will be your sets of dependencies. Ivy proposes two mechanism to only resolve/retrieve dependencies. You can use configurations, or type of artefact. The use of configurations will allow you to manage which modules are included in your resolution. The type of artefact will not really change your resolutions, but will only retrieve the artefact with the right type. Gilles > -----Original Message----- > From: John Wu [mailto:[EMAIL PROTECTED] > Sent: mardi 21 août 2007 18:19 > To: [email protected] > Subject: HOWTO - Resolve dependencies on demand > > Hi, > > > > I'm a newbie of Ivy and have a request of resolving dependencies on > demand. > > > > Instead of requesting ivy to resolve all the dependencies by using the > default big resolver, I want ivy to resolve (and retrieve) only a set > of dependencies (say them set of D) by default, and resolve another > set of dependencies (say them set of X) while running task X. > > > > That request seems possible based on the description here > (http://incubator.apache.org/ivy/history/trunk/configuration/modules.h > tm l). But, I couldn't find a concrete working example. Can someone > shed light on this issue? > > > > Thanks, > > > > John Wu > > ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________
