Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@apache.org Received: (qmail 48708 invoked from network); 5 Mar 2002 12:09:12 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 5 Mar 2002 12:09:12 -0000 Received: (qmail 28850 invoked by uid 97); 5 Mar 2002 12:09:04 -0000 Delivered-To: qmlist-jakarta-archive-ant-user@jakarta.apache.org Received: (qmail 28834 invoked by uid 97); 5 Mar 2002 12:09:04 -0000 Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 28823 invoked from network); 5 Mar 2002 12:09:03 -0000 X-Authentication-Warning: bodewig.bost.de: bodewig set sender to bodewig@apache.org using -f To: ant-user@jakarta.apache.org Subject: Re: Environment Variable Retrieval in Future Ant Versions References: <31936.1015329354@www54.gmx.net> From: Stefan Bodewig Date: 05 Mar 2002 13:08:25 +0100 In-Reply-To: <31936.1015329354@www54.gmx.net> Message-ID: Lines: 49 User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Civil Service) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Tue, 5 Mar 2002, Christoph Thommes wrote: > I would like to read an environment variable on a Windows machine, > for example SystemRoot. > > Since the environment variable retrieval in Ant is case-sensitive, I > cannot be sure that > > > > > will always return a value. I, therefore, would like to have a > default value, if no value is available. Simply assign your default value to env.SystemRoot after the - if no environment varibale of that name has been defined, Ant will set your defauklt value. Otherwise it won't override the original value. > Is the condition statement going to work the same way in future > versions of Ant (1.5+)? No. But you could do taking advantage of not overriding existing properties. The Ant 1.4.1 way would be I'd stick with and use ${env.SystemRoot} through the whole build. Stefan -- To unsubscribe, e-mail: For additional commands, e-mail: