ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject <property> task sure looks broken to me
Date Sat, 21 Oct 2000 02:47:59 GMT
I wrote about this in another message, but I think it went to ant-user, so
maybe you developer-types didn't see it. The <property> task appears to be
broken. It's supposed to set the specified property to "true" by default,
but any if/unless you use on a property set by <property> will always test
out as NOT set, unless you explicitly set the value in the <property> task
to "true":

  <target name="verifyproperty" depends="chkproperty" if="verified">
    <echo message="  Property task is okay afterall."/>
  </target>

  <target name="chkproperty">
    <echo message="  Using property w/o explicit set to true."/>
    <property name="verified"/>
  </target>

Results in:
[binky] ant -f test.xml verifyproperty
Buildfile: test.xml
chkproperty:
  Using property w/o explicit set to true.
verifyproperty:

BUILD SUCCESSFUL
Total time: 1 second

Using:
  <target name="verifyproperty" depends="chkproperty" if="verified">
    <echo message="  Property task is broken."/>
  </target>

  <target name="chkproperty">
    <echo message="  Using property with explicit set to true."/>
    <property name="verified" value="true"/>
  </target>

results in:
[binky] ant -f test.xml verifyproperty
Buildfile: test.xml
chkproperty:
  Using property with explicit set to true.
verifyproperty:
  Property task is broken.

BUILD SUCCESSFUL
Total time: 1 second

Diane


=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Messenger - Talk while you surf!  It's FREE.
http://im.yahoo.com/

Mime
View raw message