ant-user mailing list archives

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

	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.


Jan
---------------

HTH

-Luis

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


All,

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

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? 

Thanks

Barry


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org

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