> -----Original Message-----
> From: Nicola Ken Barozzi [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 01, 2003 10:27 AM
> To: [EMAIL PROTECTED]
> 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
> > importing/renaming.
> 
> 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.

> > <override target="init">
> >   <depends target="a.init" />
> >   <depends target="b.init" />
> > </override>
> 
> 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)

--DD

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to