ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 12292] - [PATCH] enable <depends target=""/> tag inside targets
Date Wed, 29 Jan 2003 14:16:55 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12292>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12292

[PATCH] enable <depends target=""/> tag inside targets





------- Additional Comments From nicolaken@apache.org  2003-01-29 14:16 -------
The use case is that of syntax sugar.

Instead of using it, one could simply split the target in many pieces and add
dependencies on those, but this many times makes the build really hard to read
and maintain.

In this case it's simple:

    <target  name="test2" depends="pre1, pre2, c, testafter">
       <echo message="test-before"/>
    </target>

    <target  name="testafter">
       <echo message="test-after"/>
    </target>

So users use <antcall> for it, with the associated new-project overhead etc.

Taken from Myrmidon 
http://ant.apache.org/myrmidon/differences.html

" As well as the depends attribute of the Target there is a new <depends> task
that allows you to evaluate dependencies inside a target just like executing a
normal task. This change was made as previously users have tried to achieve this
behaviour by using antcall. However you had to add if attributes to the common
targets to make sure that they were not evaluated multiple times. This was
difficult and error prone. Building it into the tool helps directly supports
this usecase."

As for the misleading target association, it's a bug 8-)

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


Mime
View raw message