On Fri, 19 Oct 2001 16:22, Stefan Bodewig wrote: > As it stands, a couple of tasks can live at the same level as > <target>, but they are hard coded by name. How do we want to handle > this in Ant2?
no idea ;) However before we edecide on this we first need to discuss scoping of properties because this will have a direct impact on our structure. If properties are scoped by target then (1) is definetly out because no target could set properties for another target. If properties are scoped at project level (like we do now) then all is fine. If properties are mutable then I would think that (1) definetly comes out ahead as it is more difficult to think of "global" properties as being immutable. Then there is interaction between the two, immutable scoped vs mutable scoped, vs immutable unscoped vs mutable unscoped. So I think these need to be decided upon first as they will directly influence a decision on this question. FWIW I think I like Imuttable but I am +/-0 on scoping and could swing either way. > (1) Allow no tasks to be defined at the same level as <target> (this > is what Tim Dawson has proposed IIRC). This has a very nice "academic" feel and kinda forces certain structure into build file. It has the slight disadvantage that it could mean you have to search around for all the properties. > (2) Allow all tasks to be defined at the same level as <target> (I > don't know whether he remembers it, but Sam Ruby proposed this about > fifteen months ago 8-). This has the advantage (or disadvantage) that ant files become mere scripts and could be used for a wider variety of things. It would also lead to a more scriptier core. If we choose not to go down this path I will still provide another format to write ant "Scripts" in any ways so either is good. > (3) Allow all tasks that implement a given marker interface to be > defined at the same level as <target>s (Jose Alberto Fernandez > proposes this and has already supplied a patch that enables this in > Ant 1.x). This is good because it flexabile and pushes all decisions to task writer ... it is bad for all the same reasons ;) > (4) Keep it the way it is in Ant 1.4 - only a fixed number of tasks > can live at the same level as <target> and their names are hard coded > in Ant's core (don't know of a proponent). I think I actually like this. In Ant2 there will not be a need for taskdefs at top level so we really only need to allow property setting in various guises .. unless of course we end up allowing <if/> ;) I think we should have a play first. -- Cheers, Pete --------------------------------------------------------- Clarke's Third Law: "Any technology distinguishable from magic is insufficiently advanced". ---------------------------------------------------------
