Return-Path: Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Delivered-To: mailing list dev@ant.apache.org Received: (qmail 83486 invoked from network); 20 May 2003 20:26:12 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 20 May 2003 20:26:12 -0000 Received: (qmail 993 invoked by uid 50); 20 May 2003 20:28:23 -0000 Date: 20 May 2003 20:28:23 -0000 Message-ID: <20030520202823.992.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: dev@ant.apache.org Cc: Subject: DO NOT REPLY [Bug 20085] New: - If a propert is unset, property substitution does nothing X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20085 If a propert is unset, property substitution does nothing Summary: If a propert is unset, property substitution does nothing Product: Ant Version: 1.5.1 Platform: PC OS/Version: Linux Status: NEW Severity: Normal Priority: Other Component: Core AssignedTo: dev@ant.apache.org ReportedBy: chrisl+ant@cs.cmu.edu If property foo is not set, no substitution is performed on the string "${foo}". That is, if I write "myprogram ${foo}" and foo is not set, this string is passed unmodified so that "myprogram" sees "${foo}" as its argument, not an empty (or no) argument. What I'd like to be able to do is write things like and if env.ALERT_DIR is not set, for it to expand to an empty string. The fact that ${env.ALERT_DIR} is unmodified if the variable is unset is bizarre to me, considering it's not how $-style substitution works anywhere else. Because it's unlike anything else, I consider it a bug, rather than an RFE. If someone knows of a workaround, I'd appreciate it, but I can't figure one out. I set its severity because I couldn't figure out a workaround, but that may be because I don't know ant well enough. Here's a build.xml file that shows the problem: