ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject RE: optional task jars
Date Tue, 20 Jul 2004 18:54:34 GMT
> From: []
> In my installation of ant I am not allowed to put any of the jars required
> for the optional tasks in the ant lib directory.  They have to go in
> another directory.  What is the best way to get those jar files on to the
> class path.  For custom tasks like ant-contrib I use the classpath
> reference to the taksdef or the typedef.  I need to use sshexec and scp is
> there  any way to get a classpath reference to the appropriate jar file to
> use sshexec and scp?

The easiest way is to have a wrapper script (our are build.bat/.sh) around
Ant that does project specific things, and call ant with the -lib switch to
automatically add all the JARs in the directory following the -lib to Ant's

This way, some projects use a classpath for Ant with only the Ant jars,
while others can 3rd party JARs used by the optional/custom tasks specific
to this project.

But it's a pity you can't just add these JARs in ant/lib, 'cause that's the
easiest of course. That's what I do ;-) --DD

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message