ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johan Adelöw <>
Subject RE: Problem with fail task
Date Tue, 18 Nov 2003 12:51:04 GMT
Sorry I found it it should be 
<fail message="${TEXT1} DIR ${TEXT2}" unless="DIR"/>
Instead of 
<fail message="${TEXT1} DIR ${TEXT2}" unless="${DIR}"/>


-----Original Message-----
From: Johan Adelöw 
Sent: den 18 november 2003 13:47
Subject: Problem with fail task


I'm having problem with the fail task. I've written a piece of code that I
thought would fail if the property wasn't set and otherwise just pass.

The fail task fails though the property DIR is set. (I've added an echo to
make it show) 

I'm using Ant 1.5. 

Any suggestions ?


My target:


            <target name= "test_properties">

                <property name="TEXT1" value="The property"/>

                <property name="TEXT2" value="is not set please check the
properties file"/>

                <echo message=" DIR: ${ DIR}"/>

                <fail message="${TEXT1} DIR ${TEXT2}" unless="${DIR}"/>






     [echo] DIR: C:/tmp/version/3_1_0



file:C:/tmp/version/3_1_0/inst/test_properties.xml:28: The property DIR is

 not set please check the properties file

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

View raw message