groovy cannot access local properties in macrodef

189 Views Asked by At

When I have the followng macro:

<macrodef name="foo">
  <attribute name="whatever"/>
  <sequential>
    <local name="variant"/>
    <property name="variant" value="one"/>
    <groovy>
      println properties.variant
    </groovy>
  </sequential>
</macrodef>

It prints: [groovy] null

Could someone explain, why local does not seem to work here?

0

There are 0 best solutions below