ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: Setting Ant classpath
Date Mon, 24 Nov 2008 06:21:55 GMT
>Is it possible to set Ant's classpath from within the build.xml itself?
>
>Basically, I've got a directory full of libs that contain Ant 
>tasks, and 
>I'd rather not have to specify each one on the command line or in 
><taskdef>s. I'd rather just have a single line in my build.xml 
>that says 
>"put all the jars in this directory on the classpath as if they'd been 
>added on the command line".

<taskdef> supports nested <classpath>.
But some libraries must be added _before_ Ant starts, like bsf,
commons-logging, rhino or xalan.
http://ant.apache.org/manual/CoreTasks/typedef.html

So another way would be setting the -lib option by
- your own launcher script
- ~/antrc_pre.bat : set variable ANT_ARGS
http://ant.apache.org/manual/running.html#files

You could also place your libs in ~/.ant/lib
http://ant.apache.org/manual/running.html#libs


Jan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message