ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject Re: overriding targets that are extension-of an extension point
Date Mon, 28 Jul 2014 16:43:13 GMT
On Mon, Jul 28, 2014 at 5:33 PM, Daniel Walden <>

> [...] I am making use of target overriding in combination with
> extension-points.
> I have the same problem as that discussed here, which will hit me when I
> upgrade to ant 1.9:
> [...] In Comment #2 it was mentioned that the latter case is considered
> "dangerous",
> but isn't overriding *any* target dangerous in that sense? As a script
> developer I would first
> go and see what I am overriding, see what it depends on, see what it
> extends, etc.
> Is it that the philosophy of removing flow control logic out of
> project-specific scripts
> is not the Ant Way?

Not really, at least the way I understand it.

Reading the thread on BugZilla, and your message, it sounds logical to me
to be able to override an "extension-of" target just the same way as a
regular target. Yes, it's dangerous in a way, but as you say, so is target
overriding in general. Note that despite having done lots of large complex
builds with Ant, with import and target overriding and all, that was prior
to extension-of's introduction, and I don't even recall if I participated
in the design discussions (or to what extent if I did), so it's possible I
misunderstand, since I never used it myself. Ideally, one should be able to
decide for oneself whether to inherit the depends attribute, or even the
extension-of attribute when overriding targets, and in the case of depends
to "inject" dependencies before and/or after the ones from the overriden
target. I've always felt the target "body-content" and its "depends"
attribute are two separate things, that one often wants to override
separately, and that's why in my build script I often separated the two,
with a empty-body target with depends, and depends-less target doing the
work, the first depending on the second (again, before there was
extension-of). This is all years away for me, so maybe I'm off base here
:). --DD

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message