ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <>
Subject Re: using system environment variable within ANT?
Date Tue, 05 Sep 2000 16:59:49 GMT
--- Alexandre POLOZOFF   <> 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

$JAVACMD -classpath $LOCALCLASSPATH -Dbuild.compiler=$ANT_COMPILER

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

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



Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!

View raw message