"Dominique Devienne" <[EMAIL PROTECTED]> writes: > On Jan 11, 2008 8:11 AM, Stefan Bodewig <[EMAIL PROTECTED]> wrote: >> "Gilles Scokart" <[EMAIL PROTECTED]> writes: >> >> > I never thought to overwrite macro to customize a generic build script. >> > Can >> > macro be overwritten? >> >> Sure, it's just another Ant task that has been defined. > > But my point is that most of the time, you never want to override > things (macros or target), but augment them with some kind of pre or > post processing.
Hey, I didn't say it was a good thing to do, I just pointed out that technically you can override a macrodef'ed task just like any other task. > Peo's point of simply copy-pasting the "abstract" build code to > fully override the target duplicates that code, and makes build > maintenance all the more difficult. I'm not convinced that we need something like this at the task level, while I agree we need some better support for it at the target level. Back during the Ant2 discussions we have been talking about adding AOP like features to Ant at a well-defined "pointcut"s like target and task invactions. This may be overkill, though. Having something like before/after/around advices (where around is the same as an override that doesn't change the dependencies list) may suffice and leave overwriting the whole target definition to the worst case. Stefan -- http://stefan.samaflost.de/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]