ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "didge" <di...@foundrylogic.com>
Subject RE: Validating and assign variables in ant
Date Tue, 16 Dec 2003 18:09:03 GMT
Have you tried <fail>?

For example:
<fail message="CATALINA_HOME must be set" unless="${env.CATALINA_HOME}/>

didge

> -----Original Message-----
> From: barry@goodconsultants.com [mailto:barry@goodconsultants.com]
> Sent: Tuesday, December 16, 2003 9: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
> 
> 

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


Mime
View raw message