ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <nicola...@apache.org>
Subject Re: <import> enhancement, it's done, but do you like how it works?
Date Thu, 11 Jul 2002 09:18:40 GMT
dion@multitask.com.au wrote:
> Nicola Ken Barozzi <nicolaken@apache.org> wrote on 07/11/2002 05:48:41 PM:
 >
>>dion@multitask.com.au wrote:
 >>
>>>Is super.mytarget a 'special' keyword? Given that you're 'redefining' 
>>> that 
>>>target (mytarget), what does antcalling it do? This is confusing IMHO 
>>> for an end user.
>>
>>Hmmm...
>>It works like in java.
> 
> Well java methods don't have dependencies..... and this will break 
> compatibility with all targets that are defined as 'super.XXXX'.

Hmmm...

>>super.  is a special prefix.
>>If I redefine mycooltarget two times I can call the first version via 
>>super.super.mycooltarget , and the second version super.mycooltarget .
>>
>>Any suggestions on how it can be made better?
> 
> Don't use antcall and target..... add a new tag to call the overidden 
> one.....lots of other possibilities...??

Ok then how about:

(a)

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

(b)

  <target name="mytarget" >
    <dostuff1/>
    <super level="1"/> <!-- level is optional -->
    <dostuff2/>
  </target>

(c)

  <target name="mytarget" allowoverride="true" >
    <dostuff1/>
    <super target="mytarget"/>
    <dostuff2/>
  </target>

(d)

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

(e)

   combinations of the above.

-- 
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