ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nesbitt, Steve" <>
Subject Q: Nasty environment variable behavior?
Date Fri, 20 Jul 2001 00:09:16 GMT

For compatibility purposes I am allowing, as a last resort, a series of
properties to be defined based on environment variables. Here's the code:

    <property environment="env" />
    <property name="build.type"            value="${env.BUILD_TYPE}" />

The nasty behavior I'm experiencing is that if an environment variable is
not defined, then the value of the property is not left undefined but set to
the string in the value field. For example, if there is no BUILD_TYPE
environment variable set, the build.type property gets set to the string

This, IMHO, is pretty funky behavior and pretty nasty. It makes it
impossible, without using the script task to verify that all required
properties have values.

Can anyone confirm? Before I dig into the code has this issue been

This is with Ant 1.3



Steve Nesbitt
Configuration Manager
The Cobalt Group, Inc.
2200 First Avenue South
Seattle, WA 98134 
If it's automotive and it's Internet, it's Cobalt. 

View raw message