You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Ja...@rzf.fin-nrw.de on 2003/12/16 08:32:39 UTC
RE: Question about validating environment variables and assigning
parameters
Do you have a
<property environment="system"/>
<property name="system.JAVA_HOME" value="--not-set--"/>
before your statements?
The first line gives you access to the environment variables.
The second sets the system.JAVA_HOME to a default value if there is no
JAVA_HOME in the environment.
Jan
> -----Original Message-----
> From: Baz [mailto:barry@goodconsultants.com]
> Sent: Monday, December 15, 2003 8:31 AM
> To: Ant Users List
> Subject: Question about validating environment variables and assigning
> parameters
>
>
> All,
>
> I am trying to do this:
>
> <property name="javaBase" value="${system.JAVA_HOME}"/>
>
> <target name="barry" if="javaBase">
>
> <echo message="TEST: JAVA_HOME is ${javaBase}."/>
>
> </target>
>
> The problem is, there will always be a value for ${javaBase}. See the
> following output...
>
> barry:
> [echo] TEST: JAVA_HOME is ${system.JAVA_HOME}.
>
> How can I do it properly? Please help.
>
> Thanks
>
> Barry
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>