Return-Path: Mailing-List: contact user-help@ant.apache.org; run by ezmlm Delivered-To: mailing list user@ant.apache.org Received: (qmail 40088 invoked from network); 19 Mar 2003 23:29:05 -0000 Received: from auds951.usa.alcatel.com (143.209.238.80) by daedalus.apache.org with SMTP; 19 Mar 2003 23:29:05 -0000 Received: from alcatel.com (localhost [127.0.0.1]) by auds951.usa.alcatel.com (8.12.8/8.12.8) with ESMTP id h2JNTBtR011470 for ; Wed, 19 Mar 2003 17:29:11 -0600 (CST) Message-ID: <3E78FD03.E348D7AC@alcatel.com> Date: Wed, 19 Mar 2003 17:28:03 -0600 From: Sebastien Blanc Organization: Alcatel USA X-Mailer: Mozilla 4.78 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Ant Users List Subject: Re: Access to Environment Variables other than ANT_HOME of CLASSPATH References: <3E78E9B1.43DF7DA2@alcatel.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi James ! see inserted. seb. James Sinnamon wrote: > Seb, > > On Thu, 20 Mar 2003 09:05, you wrote: > > > > > > > > > > > > If I set an environment variable such as in the following example: > > export BASE_BOOTIMAGE_COMPILER=1 > export BASE_RUNTIME_COMPILER=1 > export NO_GC=1 > export WITH_CLUSTER=1 > > ... and then run ant, will I be able to refer to these variables > within build.xml? yes. whatever environment variables are in the shell from witch u launch ANT are gonna accessible via property environment. > Basically I am hoping to be able to replace > some scripts with a few ant targets which use the 'echo' task, > and will be conditional on the setting of these variables. > It would be easier to do so if I could do it without having to > redefine these environment variables in other files. > > > checkout the environment> in doc. > > seb. > > Not sure where to find it. I have looked at everthing I could find in the > documentation which is related to Environment variables in the > Could you be more specific or show me the URL? > go to Core Tasks and then 'basename' or property': http://ant.apache.org/manual/CoreTasks/basename.html http://ant.apache.org/manual/CoreTasks/property.html and - agree with Alexey - this is true that this can be done per which looks like a nicer java way of doing it, then getting rid of ur legacy shell scripts using configuration variable. "I am hoping to be able to replace some scripts with a few ant targets which use the 'echo' task, and will be conditional on the setting of these variables. It would be easier to do so if I could do it without having to redefine these environment variables in other files." -> not sure exactly wat u wanna do. can u expand ? are u trying to perform something different in the script depending on a variable or to just to do something different in the program u're trying to launch ? seb.