ant-user mailing list archives

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

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}"/>

            </target>

 

Result:

 

test_properties:

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

 

BUILD FAILED

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

 not set please check the properties file


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