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
maintenance.
also i don't want to use =
<taskdef ...>
  <classpath>
  ...
    </classpath>
</taskdef>

in every ant script.

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

windows
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 =

unix
$ANT_HOME/bin/ant

windows
%ANT_HOME%/bin/ant.bat

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 =
http://ant.apache.org/manual/running.html#commandline
http://ant.apache.org/manual/running.html#libs



Regards, Gilbert






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

Reply via email to