Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@jakarta.apache.org Received: (qmail 67516 invoked by uid 500); 20 Jul 2001 00:08:48 -0000 Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: ant-user@jakarta.apache.org Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 67496 invoked from network); 20 Jul 2001 00:08:48 -0000 Message-ID: <03F415D3A243D411AD3600D0B774BE4403E8C11E@ex-sea-is.cobaltgroup.com> From: "Nesbitt, Steve" To: "'ant-user@jakarta.apache.org'" Subject: Q: Nasty environment variable behavior? Date: Thu, 19 Jul 2001 17:09:16 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C110B0.36B0F5E0" X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C110B0.36B0F5E0 Content-Type: text/plain; charset="iso-8859-1" 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: 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. ------_=_NextPart_001_01C110B0.36B0F5E0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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=3D"env" />
    <property = name=3D"build.type"       &= nbsp;    value=3D"${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.


------_=_NextPart_001_01C110B0.36B0F5E0--