OK, then, we just have to convince actual committers I guess ;-) --DD -----Original Message----- From: Nicola Ken Barozzi [mailto:[EMAIL PROTECTED] Sent: Saturday, July 20, 2002 2:34 PM To: Ant Developers List Subject: Re: <init>/<finally> and top-level tasks (was RE: Problems with <impo rt>)
Dominique Devienne wrote: > OK, then. I can agree with that. > > Question #1: > How many times do <init> and <finally> run when I do: > > ant -builldfile antx build doSomething > > If you had build and doSomething both depend on an init target, init would > be run twice. With a special <init> element, how many times does it run? It should be run as having depends="init" on all targets, ie run twice. > Question #2: > How does <init> relates to top-level elements like > <property>/<path>/taskdef/...? > Does it run before? after? > having top-level tasks allowed gives you an implicit <init>!� Exactly. That's why I proposed to deprecate them. > Personnally, I think having an explicit <init> that contains tasks is better > that having top-level tasks. Has St�phane B. wrote, you can't wrote code > outside methods in Java, so why allow tasks outside of targets. � Yup. > You can have > data outside of methods though, which is why we have data types outside > targets. We should keep it that way. Exactly. I was improperly saying "deprecating", since global top-level tasks were not enabled in 1.5. +1 as you say. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
