ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <nicola...@apache.org>
Subject <import> enhancement, it's done, but do you like how it works?
Date Thu, 11 Jul 2002 07:00:18 GMT
As you may have seen, the import tag patch now supports redefining 
targets  :-)

Suppose this target:

<target name="mytarget" depends="a,b,c"><dostuff/></target>

is in a file that is imported by my buildfile.

With the patch I can redefine it as follows:

  <target name="mytarget">
    <dostuff1/>
    <antcall target="super.mytarget"/>
    <dostuff2/>
  </target>


Now, mytarget currently does *not* inherit dependencies, although, 
having used the same name, it will effectively replace the old version 
in the graph.

This is the order in which the targets are called, also with the outcome 
in case we enable dependency inheritance:

  1 original mytarget:   a->b->c->dostuff
  2 redefined mytarget:  dostuff1->a->b->c->dostuff->dostuff2
  3 dependency inherit:  a->b->c->dostuff1->dostuff->dostuff2

IMHO (2) would be the outcome that users think comes out.

What do you think?

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


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


Mime
View raw message