I'm fiddling around with my first Groovy task in Ant/Webtest & have run into
something I don't understand.

Here's the relevant XML:

<scriptdef name="getEmptyDirs" language="groovy">
 <attribute name="root"/>
 <attribute name="property"/>
        String emptyDirs = ''
        new File(attributes.get('root')).eachDirRecurse() { dir ->
                if (dir.list().size() == 0) emptyDirs += ' "' +
dir.absolutePath + '"'
        }
        project.setUserProperty(attributes.get('property'), emptyDirs)
</scriptdef>

My confusion is with the last line of Groovy code.  If I use
project.setProperty or project.setNewProperty, the property is not affected.
What am I missing?


--
Jonathan Rosenberg
Founder & Executive Director, Tabby's Place
http://www.tabbysplace.org/



_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to