ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject Re: using system environment variable within ANT?
Date Tue, 05 Sep 2000 16:59:49 GMT
--- Alexandre POLOZOFF   <diamond@polozoff.com> wrote:
> I have a build.cmd file that sets the environment variable ANT_COMPILER
> to jikes if the jikes compiler is installed. I set build.compiler to
> ${ant_compiler} I get an error from ant that it does not know how to use
> ${ant_compiler} so it is obviously not expanding my tag... how can I get
> this to work?

If you run Ant using a cover-script, you can include a define (on the
command-line in the script that calls Ant) based on your environment
compiler variable. For example (for sh - sorry, can't remember cmd
parlance):

$JAVACMD -classpath $LOCALCLASSPATH -Dbuild.compiler=$ANT_COMPILER
$ANT_OPTS org.apache.tools.ant.Main $@

Alternatively, you could include commands in your build.cmd file to output
to an Ant properties file a line like:
build.compiler=jikes

Hope this helps (and that I got it right -- I'm still learning Ant as well
:)

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/

Mime
View raw message