ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Ivanov <>
Subject Re: Best way to run Ant without installing it?
Date Fri, 17 Sep 2004 10:57:33 GMT
Hi Emmanouil,

> Hi Ivan,
> Thanks for your reply.
> Yup, i already do that, but the only way i could
> make it work is by 
> modifying the ant.bat and to set ANT_HOME and
> PATH accordingly. 

Well, I frankly *never* (really never) set ANT_HOME
since ant launcing scripts are clever enough to set it
correctly by themselves. I am only responsible for
adding the ant/bin directory to PATH. 

> However, this has some drawbacks:
> * it would be better not to mess with a frustrated
> user's env properties 

It is not neccessary to mess it. You only set it in
your install scripts like this:

# your install script

ant -f your_install_script.xml your_install_target

#Your installation has finished, some error checks??

rm -rf $ANT_INSTALL_DIR/ant

# end of your install script

As far as I remember all variables you haved used are
discarded after the script finish. For Windows you can
encompass the bat script with SETLOCAL and ENDLOCAL

Do you find this way clean enough and working for you?

> ;-) and
> * modifications to Ant distribution files should be
> avoided 
> (maintainance etc)
> So I'm looking for the best way to make this work
> without the above by 
> calling some class directly instead of a script.

It is also possible but this means rewriting ant
starting scripts as you should take care of ant's

I would be more glad to provide you and Jim my own
scripts for this, but I do not owe them anymore.
Anyway I will ask for them.

HTH Ivan

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

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

View raw message