ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Available or If/Unless problem
Date Thu, 23 Aug 2001 12:42:43 GMT
I built the following build file to narrow down a problem I'm having with
the If/Unless feature.

<project name="java standard library" default="echo" basedir=".">
     <property name="bw.local.present" value="true"/>
     <property name="" value="false"/>
     <target name="echoLocal" if="${bw.local.present}">
          <echo>BW Local Present</echo>
     <target name="echoDev" if="${}">
          <echo>BW Dev Present</echo>
     <target name="echo" depends="echoLocal,echoDev"/>

I would expect the target 'echoLocal' to print out but not 'echoDev'.  In
the following excerpt from a debug output, the properties seem to be set
correctly, but the "If" check still says that it is going to skip running
the target because the property is not set.

Project base dir set to: C:\IT\Dev\JavaLib
   +Task: property
Setting project property: bw.local.present -> true
   +Task: property
Setting project property: -> false
 +Target: echoLocal
   +Task: echo
 +Target: echoDev
   +Task: echo
 +Target: echo
Build sequence for target `echo' is [echoLocal, echoDev, echo]
Complete build sequence is [echoLocal, echoDev, echo]

Skipped because property '${bw.local.present}' not set.

Skipped because property '${}' not set.



Total time: 2 seconds

Thanks in advance for help and I've attached a copy of the full debug
output in case it's helpful.
(See attached file: out.txt)


Andrew Goodnough
Dana Commercial Credit
(419) 891-2065
View raw message