ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From johann.pet...@gmail.com
Subject Using and checking an environment variable?
Date Tue, 06 Jun 2006 09:41:21 GMT
I want to distribute the build.xml file with an application and therefore
not include any paths to software the application depends on. Ideally I
would want to take this from an environment variable and show an error
message if the environment variable is not set.

Currently I set a property like this:
  <property name="sw.home" location="${env.THE_VARIABLE}" />
and later use sw.home wherever needed.

I cannot figure out how to best provide a default here or even better, abort
with a descriptive error message if the environment variable is not set.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message