ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: if files have been copied physically, then execute some target
Date Mon, 11 May 2009 05:15:14 GMT
><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:kim.walisch@gmail.com] 
>Gesendet: Freitag, 8. Mai 2009 22:03
>An: user@ant.apache.org
>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: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>

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


Mime
View raw message