Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@jakarta.apache.org Received: (qmail 9677 invoked by uid 500); 2 Aug 2001 01:51:26 -0000 Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: ant-user@jakarta.apache.org Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 9668 invoked from network); 2 Aug 2001 01:51:26 -0000 X-Server-Uuid: 611fd078-1d0c-11d4-90c7-00508bcfbe58 From: "Phil Beiler" To: ant-user@jakarta.apache.org Subject: myenv property question.... Date: Wed, 1 Aug 2001 21:50:26 -0400 Message-ID: MIME-Version: 1.0 X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-WSS-ID: 17766CB54089260-01-01 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit Content-Transfer-Encoding: 7bit X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N Why does ANT do this? How should I do this? 1. I am using the myenv.xxxxx approach to getting environment variables. I wanted to feed conditionally set environment variables to some jUnit tests.. 2. If the variable is NOT set, it puts the myenv.xxxxxx as the value of the property, rather than setting it to null or blank. 3. Why would the code, ProjectHelper.java, replaceProperties method set the value to property is was looking for when it is not found in the environment? Obviously, this is not how I should be doing this... for example... 1. if the OVERRIDE_LOG4J environment variable is not set, use the default properties file 2. if the OVERRIDE_LOG4J environment variable is set, use that properties files to initialize log4j Simple, but I cannot cleanly determine if the variable is set or not. Thanks for any help. Phil --------------- Output from ant ---------------------------------- Ant version 1.3 compiled on March 2 2001 Searching for build.test.xml ... Detected Java Version: 1.3 Detected OS: Windows NT Project base dir set to: C:\home\me\UnitTest [property] Loading Environment myenv. Property ${myenv.TEST_SET} has not been set !!!!!!!!!!!!!! Build sequence for target `me' is [me] Complete build sequence is [me] me: [echo] Env Variable ${myenv.TEST_SET} BUILD SUCCESSFUL Total time: 1 second --------------------------------- SIMPLE XML FILE -------------------- Env Variable ${env.variable}