Grokbase Groups Ant user August 2009

[Ant-user] where to keep jar files

Gilbert Rebhan
Aug 6, 2009 at 8:27 pm

Raagu schrieb:
In my build script, I have made use of <for> , <scriptdef> and other tasks
which made use of external jars . I have kept those jar files in
${ANT_HOME}\lib directory.. But I dont want to keep those jar files in Ant
Lib's directory.. So Is there any way to keep those jar files in other
directory may be in directory where build script resides. ??
throwing all jars into %ANT_HOME%/lib is the easiest way, but i prefer
to keep ant installation clean, which is also better for reasons of
also i don't want to use =
<taskdef ...>

in every ant script.

using scripts to start my ant files, f.e. =

set JAVA_HOME=C:\java\jdk\1.6.0_15
set ANT_HOME=C:\ant
set ANT_ARGS=-lib C:\ant_xtralibs;C:\ant_testlibs
set PATH=%PATH%;%JAVA_HOME%\bin;%ANT_HOME%\bin;C:\cvsnt

:: default
call ant -f %1

:: debug
::call ant -debug -f %1

unix - don't forget the quotationmarks on the ANT_ARGS line !
ANT_ARGS="-lib /usr/local/ant_xtralibs:/usr/local/ant_testlibs"
export ANT_ARGS

so i don't need to use ant -lib everytime
i think you get the idea.

-- other possibilities --

1.put those 'set ANT_ARGS ...'stuff into =



disadvantage = changes the ant core installation, remember
your changes before you copy your ant installation to
another machine and strange things happen !

2.put your extralibs in ${user.home}/.ant/lib

advantage = every user may use his own set of libraries

see =

Regards, Gilbert

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

Search Discussions

Discussion Posts


Follow ups

Related Discussions