ant-user mailing list archives

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

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
${env.BUILD_TYPE}.

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
addressed?

This is with Ant 1.3

Thanks!

-steve

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



Mime
View raw message