Wolfgang Häfelinger <[EMAIL PROTECTED]> writes: > Why not simply: > > <!-- === framework === --> > <target name="foo" depends="bar,baz" description="public foo target"> > <foo /> > </target> > > <macrodef name="foo" > > <sequential> > <!-- to the foo thing --> > </sequential> > </macrodef> > > > If a user then really need to override "foo", he or she would simply > write in build.xml something like > > > <macrodef name="foo"> > <sequential> > <echo> before original foo ..</echo> > > <c:foo /> <!-- assume framework in NS "c" /> > > <echo> after original foo .. </echo> > </sequential> > </macrodef>
Can you do <c:foo/> without changes to Ant? The problems I see with this: * not idiomatic (no real problem, though) * requires all targets to consist of a single macro definition * becomes repetetive with little chance for reuse Say I'd like to perform the same action before more than one target <target name="my-before" before="foo,bar,baz"> <do-something/> </target> instead of <macrodef name="foo"> <sequential> <do-something/> <c:foo/> </sequential> </macrodef> <macrodef name="bar"> <sequential> <do-something/> <c:bar/> </sequential> </macrodef> <macrodef name="baz"> <sequential> <do-something/> <c:baz/> </sequential> </macrodef> * doesn't factor into the dependency calculation taking the example from above, if all three targets foo, bar and baz were executed in the same build, the dependencies of my-before would only be executed once. Stefan --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]