peter reilly wrote:

(hopefully this should be the final feature vote for 1.6)

The local feature allows local properties - properties
that are valid only for the enclosing scope.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23942

This is a useful feature in general and for macrodef in particular.
For example the macrodef in Stefan's blog:

http://stefanbodewig.blogger.de/20031114

may be implemented by:

  <macrodef name="check-and-fail">
    <attribute name="class"/>
    <sequential>
      <local name="it-is-there"/>
      <available classname="${class}" property="it-is-there"/>
      <fail unless="it-is-there">Couldn't find ${class}</fail>
    </sequential>
  </macrodef>

  <check-and-fail class="org.example.Foo"/>
  <check-and-fail class="org.example.Bar"/>

Vote:
[ -0] local for ant 1.6
[ +0] wait for ant 1.7

It would seem better to get this right before we ship, as then things stay broken. Holding stuff over to 1.7 lets us experiment with the model more before we actually ship. But I agree, without it, macrodef is more limited.



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to