ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <>
Subject Re: override
Date Fri, 01 Aug 2003 16:00:45 GMT

Dominique Devienne wrote, On 01/08/2003 17.38:

>>-----Original Message-----
>>From: Nicola Ken Barozzi []
>>Sent: Friday, August 01, 2003 10:27 AM
>>Subject: Re: override
>>>and that renamed targets from a and b should not be
>>>call-able directly from the command line, but only from within the build
>>>file itself, to compose them as shown above.
>>Why? I see no reason for it.
> It's consistent with my next point! If nobody's aware of the renaming, then
> a fortiori, these renamed targets should not be call-able.
>>>I already wrote about this, but I'll say again that nobody should be
>>>aware of the renaming taking place but the build file that does the
>>Sorry, I don't understand this sentence in it's practical implications.
>>Could you please expand a bit?
> For the same reasons you cannot call an overridden method from a base class
> when you are a client of the derived method. Only the derived class itself
> (in this case the build file doing the import) can is the method from its
> parent it overrides.

I don't have a need to have it, as I never used it from commandline, but 
I don't see dangers in it. Either way id fine for me.

I understand your point now, thanks.  :-)

>>><override target="init">
>>>  <depends target="a.init" />
>>>  <depends target="b.init" />
>>Can't it be instead:
>>  <override target="init" depends="a.init, b.init"/>
>>It's more similar to how target works.
>>I'm ok with either though.
> It could be, but it's less flexible. What is the importing build file needs
> to do something before and after a and b's init? Or in between? Much easier
> to do it before/after/between the <depends> tags, than being forced to
> create a specific target for before/between... (What I often refer to
> spaghetti Ant code)

Agreed, and that's why I also posted a depends tag in bugzilla (that had 
some issues it seemed and remained there).

What I tried to say is that it should be possible to /also/ have them in 
the depends attribute, as the normal target has them (for consistency).

In essence we could have (full example):

<override target="init" depends="pre.init">
   <depends target="post.init" />

I'd like to have it in normal targets too BTW :-)

Nicola Ken Barozzi         
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message