Matt,
  The target option would be good if the other target does not fail, but in
my build file i have target which executes perforce command and i capture
the result of the exec task in resultproperty. If the value of result
property is ==0 then i execute another target else execute a different
target.

<target name="testperforce" depends="stage">
    <exec executable="p4.exe" spawn="false" failonerror="false"
resultproperty="p4result">
    <arg value="changes"/>
    <arg value="-m1"/>
    <arg value="${file.name}"/>
    </exec>
   <if name="p4result" value="0">
   <antcall target ="p4changes"/>
   </if>
   <else>
   <antcall target="defaultchangenumber"/>
   </else>
</target>
-- 
View this message in context: 
http://ant.1045680.n5.nabble.com/Alternate-for-if-else-task-tp3381392p3381432.html
Sent from the Ant - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org

Reply via email to