On Jan 10, 2008 2:13 PM, Xavier Hanin <[EMAIL PROTECTED]> wrote: > On Jan 10, 2008 7:21 PM, Peter Arrenbrecht <[EMAIL PROTECTED]> > > Providing > > override hooks is all well and good, but that is still basically the > > very controlled and rigit maven approach, I think. > > It depends on what you accept to do in your override. If the build system > somewhat relies on Ant import mechanism, you are able to override any > target defined by the build system. In the end if you have something very > specific the worst that could happen is override everything, making the > build system useless except it first provided a structure. But at least you > are always free, which is not the case with maven.
Maven's override hooks are a good thing IMHO. The problem with Ant is that you have to provide them explicitly in the ''abstract'' build file so that the ''concrete'' build can override them, as opposed to Maven's hooks, where you simply define in pre-goal in the concrete build without any need to modify the abstract build. It's the C++ where all class methods are non-virtual by default, and and Java where there's virtual by default. Unless the class is specifically designed not to be extended, the Java way is more flexible because you can often intercept the virtual call and make your pre and post processing there. (let's not go into philosophical flame about the good or bad of this please) Having the ability to say in Ant <target before="compile"/> or <target after="deploy"/> with no need to add explicit -pre-compile or -post-deploy hooks in the base build would already simplify things when customizing a base build, and make it more ''hackable''. Similarly, an explicit <target override="compile"/> to explicitly completely replace a base target is better IMHO to the implicit override that currently happens, and makes the build file more readable/explicit about the intent. --DD PS: The before/after target would be moot is <target override> supported a nested <super/> element. That's a syntax that would flow better IHMO. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]