ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sharma, Jaikumar" <>
Subject <condition> task behaviour is ok ?
Date Thu, 22 Feb 2007 16:30:39 GMT


I am not sure if this is normal, please see the below mentioned small
snippet of xml code. 

What I am trying to do is test the equality one property which has been set
with the value of it, it gives me :


[echo] value of the test.set is : ${test.set} 


But if I put the condition construct at the beginning of main target then I
get the right value "true" which is right. It means condition construct 

task assigned property is not visible outside the target. I am not sure if
this is normal behaviour ?



<project name="testproject" default="main">

       <property name="project.home" value="c:\myProject" />


          <target name="main">

              <antcall target="target1" />

              <echo message="value of test.set is : ${test.set}" />



          <target name="target1">

             <condition property="test.set" value="true" >

                 <equals arg1="${project.home}" arg2="c:\myProject"
casesensitive="false" trim="true" />







It took me a while to realize it.










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