An amazing bug. I am not sure how the invoked-targets could persist across
launching ant in a whole new process?
I suppose one workaround is to add something to skip the "run" target if it
is supposed to be cleaning:
<target name="clean-check">
<condition property="in.clean.cycle">
<contains string="${ant.project.invoked-targets}" substring="clean"/>
</condition>
</target>
<target name="run" depends="clean-check" unless="in.clean.cycle">
...
</target>
Does this solve it?
On Wed, Apr 11, 2012 at 1:49 PM, ivadim <[email protected]> wrote:
> I changed my script to:
>
> <project name="test">
>
> <target name="run">
> <exec executable="cmd">
> <arg line="/c ${ant.home}/bin/ant -f ${ant.file} clean"/>
> </exec>
> </target>
>
> <target name="clean">
> <echo message="CLEAN"/>
> </target>
>
> </project>
>
> And started "ant run".(
> http://ant.1045680.n5.nabble.com/file/n5633602/log2.txt log2.txt ). But
> nothing changed :(
>
> I found that new invoke_targets list saving old information
>
> Setting ro project property: ant.project.invoked-targets ->
> run,clean,clean,clean,clean,clean,clean,clean,clean
>
>
> --
> View this message in context:
> http://ant.1045680.n5.nabble.com/Problems-with-exec-task-on-Windows-machine-tp5627489p5633602.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
--
Harold PUTMAN
Web Technology Specialist
*Lexmark International, Inc. <http://www.lexmark.com>*
740 W New Circle Rd.
Lexington, KY 40550
+1(859) 232-2839
[email protected]