ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: target - if
Date Wed, 02 Apr 2003 11:55:11 GMT
On Wed, 2 Apr 2003, Fred Hauschel <fred.hauschel@fiducia.de> wrote:

> i want to check if a directory exists, before execute an task.

You are overusing antcall and should use depends instead.

After this general statement, properties set during <antcall> will not
be set after <antcall> returns, that's why rename_home will never get
executed.

What you really want is

<target name="run" depends="prepare,home_available,rename_home"/>

Or even more likely

<target name="run" depends="prepare,rename_home"/>

with

<target name="rename_home" if="exists" depends="home_available">
...

Stefan

Mime
View raw message