Title: Q: Nasty environment variable behavior?

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
[EMAIL PROTECTED]
www.cobaltgroup.com

If it's automotive and it's Internet, it's Cobalt.


Reply via email to