ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <>
Subject Re: test environment variable and if statement
Date Tue, 05 Feb 2002 02:30:10 GMT

----- Original Message -----
From: "Diane Holt" <>
> But you don't really want to rely on environment variables that are just
> (supposedly) set, do you?  IMO, that's even scarier than hard-coding full
> paths in the build-file (which I'm also not altogether for, but it's
> better than going with env vars -- unless they're set in a file somewhere
> that's source-controlled).

Fine then!  :)

    <property environment="env"/>
    <property name="helper.jar" value="${env.HELPER_JAR}"/>
    <property file=""/>
    <path id="classpath">
      <pathelement location="${helper.jar}"/>

Where is platform-specific, if you like.  Or load by
machine name (and yes, you can get a common property for the machine name
using a couple of tricks too) <property file="${}.properties"/>
so that you can have them all under source code control and such.  (BTW,
Gump uses machine name for its workspace setting).

So, in the above, helper.jar can be defined in this order: -D, environment,
or, whichever defines it first of those.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message