ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ritchie <>
Subject Re: Alternative to if else task.
Date Fri, 11 Feb 2011 15:49:46 GMT

  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 name="testperforce" depends="stage">
    <exec executable="p4.exe" spawn="false" failonerror="false"
    <arg value="changes"/>
    <arg value="-m1"/>
    <arg value="${}"/>
   <if name="p4result" value="0">
   <antcall target ="p4changes"/>
   <antcall target="defaultchangenumber"/>
View this message in context:
Sent from the Ant - Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message