ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johan Adelöw <>
Subject Problem with fail task
Date Tue, 18 Nov 2003 12:47:10 GMT

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

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