#15 AntCall or RunTarget that honors target dependancies

open
nobody
None
5
2004-04-16
2004-04-16
Rob Shaw
No

I love the <if> target (as well as the others) as it totally
simplies conditional execution of tasks.

In the same spirit, It would be nice to be able to invoke
an Antcall or RunTarget task that would honor target
dependencies.

I.e.

<target name="delete.all" depends="init">
<if>
...
<then>
<runtarget target="delete.folders"/>
</then>
</if>
</target>

<target name="delete.folders" depends="init">
...
</target>

Ideally the call to delete.folders would not invoke a call
to init, as it has already been done by its caller.

Rob.

Discussion

  • Eric Safern
    Eric Safern
    2004-09-29

    Logged In: YES
    user_id=810519

    Easily done in Ant, if I understand your problem correctly.

    Try this:

    <target name="init" unless="init.completed" >
    ...
    <property name="init.completed" value="yes" />
    </target> <!-- init -->