ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Vogel <>
Subject Environment variables
Date Fri, 11 May 2001 20:56:44 GMT
Hi Guys,

The more ant builds I look at, the more I see the common element
of a "setenv.bat" that sets common variables like CLASSPATH
and JAVA_HOME, etc.  

When I have architected builds in the past, I try to encapsulate
all of the environment settings into the makefile itself, with 
the makefile checking the user environment for overrides.  This
works with modern "make" systems like GnuMake because I can export
a Make variable to an environment variable (for all processes 
invoked by Make) using the export keyword.

I'd like to do the same in ant, it just offends my sensibilities 
to have to run a "SetEnv.bat" file first.  I'm aware of the "env"
nested directive (though it isn't in the documentation) for javac
and exec (where it is in the documentation).  But they aren't quite
what I'm looking for.  I'd like to define a property and specify that
it should be exported into the environment of all the subprocesses
spawned by ant.

Any suggestions?


Peter A. Vogel
Manager+consultant, Configuration Management
Arsin Corporation, Professional Services  

View raw message