1 Mar 2007 14:48
Specifying additonal classpath elements when calling the <ant> task
David Corley (AT/LMI <david.corley <at> ericsson.com>
2007-03-01 13:48:15 GMT
2007-03-01 13:48:15 GMT
I'm wondering if anyone knows a way to specify additional jars for use by an <ant> task within an ant buildfile. My current setup involves 2 build files, builda.xml and buildb.xml. Builda.xml runs an <ant> task to kick-off buildb.xml. This a multiproject setup. There are many users having their own custom builda.xml, but they all call the same buildb.xml. The problem is this: In buildb.xml, I make use of Ant's <mail> task, which requires the javamail and jaf jars from sun. From what I can tell, the only way to get them on the classpath is to either: A) add from the command line with -lib B) drop them into the /ant/lib directory. Neither of the above is entirely practical for our setup. We would have to change every build script for the -lib option, and not every user uses the same ant installation, so dropping the jars into the ant/lib directory isn't entirely practical, as well as the fact we want to separate 3rd party jars for version control purposes. So basically, I'd like to run my buildb.xml and specify additional jars to be added to it's classpath that are not in builda.xml. (I know I can use inheritall/inheritref attributes in the <ant> task and specify the jars in the builda classpath, but I specifically only want the jars to be used by buildb) An suggestions/ideas?(Continue reading)
RSS Feed