ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Ivanov <>
Subject Re: Appending to ANT classpath
Date Mon, 18 Oct 2004 09:50:34 GMT
What do you need these jar's for: if you have custom
ant tasks defined there you can use classpath related
attributes of <taskdef>; if you use them to start java
classes (from their main() method) or compile your
source code you can use classpath related attribute of
<java> and <javac>.

HTH Ivan
P.S. You can placed them in ${user.home}/lib - no need
to write a wrapper.
P.P.S. If you sit on unix machine you can create an
alias for ant command:
alias ant="ant -lib your_lib_dir" - again no need to
write a wrapper

--- Ben Gill <> wrote:

> Hi,
> I have some optional jar's that I need in the
> classpath for my build.xml
> file to work.  I don't want to copy them to
> ANT_HOME/lib for them to get
> picked up, else all developers will need to copy
> these files to that
> dir.
> How can I add these jar files to ANT's classpath
> without:
> 1)       using -lib on the command line (involves
> writing a wrapper, not
> very tidy - wrapper needs to work on dos/unix etc..)
> 2)       writing an ant task to copy the jar files
> to ANT_HOME/lib
> 3)       exporting CLASSPATH before running the ant
> script...
> Is there anyway of appending to the CLASSPATH from
> within the build.xml
> file itself?

Do you Yahoo!?
Declare Yourself - Register online to vote today!

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

View raw message