ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@bost.de>
Subject Re: <exec>: where is preamble to bin/antRun set?
Date Tue, 14 Nov 2000 08:23:05 GMT
David Miller <dmiller1@flashcom.net> wrote:

> $ANT_HOME is set correctly, to /opt/ant. The build.sh file I am
> using to run ant on my project launches ant using the line:
> 
> "$JAVA_HOME"/bin/java -Dant.home=. -classpath "$TEMP_CP"
> org.apache.tools.ant.Main $@

As you might know, Java cannot access environment variables. That's
why the script intended to start Ant (bin/ant not build.sh) translates
ANT_HOME into the property ant.home.

I don't know why you've written your own wrapper instead of using ant
(build.sh is only intended to build Ant, not to use Ant), change the
invocation to read -Dant.home="$ANT_HOME" instead and you should be
done.

You can use ~/.antrc with a line like

ANT_OPTS='-classpath "$TEMP_CP"'

or similar to set additional arguments to Ant on a permanent basis
(if you use ANT_HOME/bin/ant that is).

Stefan

Mime
View raw message