ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conelly, Luis (PS, GNF, Contractor)" <>
Subject RE: Validating and assign variables in ant
Date Tue, 16 Dec 2003 18:02:32 GMT

	Jan sent this before:


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.




-----Original Message-----
From: []
Sent: Tuesday, December 16, 2003 11:47 AM
To: Ant Users List
Subject: Validating and assign variables in ant


I think I send this before but unfortunately, no answers yet. So here I go 

Can I validate and then assign values to properties in ant just like any shell 
scripts would?

Here is what I am trying to do:

      <property name="catalina.home" value="${system.CATALINA_HOME}"/>
      <property name="appserver.home" value="${system.JBOSS_DIST}"/>

As you can see, when the environment variable is not set, catalina.home will 
always be assigned to a string "${system.CATALINA_HOME}. What is the correct 
way to do it? 



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

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