ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilbert Rebhan <gil...@maksimo.de>
Subject Re: How to fail if property expansion failed...
Date Fri, 22 Oct 2010 22:38:39 GMT
-------- Original Message  --------
Subject: Re: How to fail if property expansion failed...
From: mattf <mattf64@hotmail.com>
To: dev@ant.apache.org
Date: 22.10.2010 23:39

> 
> I was hoping to avoid introducing additional requirements, such as antcontrib
> or Ivy.
[..]

> Yes, sort of; a library property is a list of jars, a library-list names
> those properties by name; and is passed to classpath after expansion to the
> actual jars, and relative names expanded.  If the expansion fails, then the
> origin list named an undeclared property, and the name-form (${name}) is
> passed to classpath, indicating failure.  Now, I want ant to fail when
> failure is indicated.<p/>

use fail combined with a nested condition, something like=

<fail message="F a i l u r e => $${yourlibproperty} not set!!">
 <condition>
  <not>
   <isset property="yourlibproperty"/>
  </not>
 </condition>
</fail>


Regards, Gilbert




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


Mime
View raw message