><target name="copy_files"> Place an <available> here which checks src_dir against ../new/dir
> <copy todir="../new/dir"> > <fileset dir="src_dir"/> > </copy> ></target> > ><target name="run" depends="copy_files"> on the <target> use an if-clause to check the property > <java jar="some_jar.jar" fork="true"/> ></target> Jan >-----Ursprüngliche Nachricht----- >Von: walki2 [mailto:[email protected]] >Gesendet: Freitag, 8. Mai 2009 22:03 >An: [email protected] >Betreff: if files have been copied physically, then execute some target > > >Hi, > >My ant code looks something like this: > >... > ><target name="copy_files"> > <copy todir="../new/dir"> > <fileset dir="src_dir"/> > </copy> ></target> > ><target name="run" depends="copy_files"> > <java jar="some_jar.jar" fork="true"/> ></target> > >... > >I would like the run target to be exectuted only if files have >been copied. >If I do not do a clean and files have not been modified, no files are >actually copied but the run target is still executed. > >How can I do this? > >Thanks, >walki >-- >View this message in context: >http://www.nabble.com/if-files-have-been-copied-physically%2C-t >hen-execute-some-target-tp23452004p23452004.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] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
