DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16799>.
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=16799

cope with (un-)set environment variables when setting properties to them

           Summary: cope with (un-)set environment variables when setting
                    properties to them
           Product: Ant
           Version: 1.5
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Core
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


in /bin/sh, it is possible to do this:

VAR=${ENV:-"default-value"}

A feature like this would be very useful in ANT, too, when trying to set
properties (and not knowing whether the env-variable is set or not):

<property name="VAR" value="${env.ENV}" />

Or, when "if/unless" would be permitted for properties, the feature can
be emulated:

<property name="VAR" value="${env.ENV}" if="env.ENV"/>
<property name="VAR" value="default-value" unless="env.ENV"/>

Reply via email to