I filed bug report 49021: TaskDef/ScriptDef in Sub Build = Memory Disaster https://issues.apache.org/bugzilla/show_bug.cgi?id=49021
From: Murray, Mike [mailto:[email protected]] Sent: Saturday, March 27, 2010 12:02 PM To: Ant Users List Subject: Loading Groovy TaskDef/ScriptDef in Sub Builds I have not been able to upgrade past Groovy 1.5.8, due to massive memory issues. I've identified the exact scenario that cause problems, but I don't know if it is a bug, or what the solution is. The <groovy> task can be used as long as the taskdef is done once, or the taskdef uses loaderref when done in a loop. But, if the loop calls a sub project, (eg antcall) the loaderref attribute does not help. The <scriptdef language="groovy"> task seems to have the exact same behavior as the <groovy> task. The <script language="groovy"> task cannot be used in a loop, since there is no way to separate the script execution from the groovy task/script definition. Any help would be greatly appreciated. Thanks, Mike PS - Attached is the script I used for diagnosing this. It uses AntContrib to loop. It can run as follows: ant -f GroovyMem.xml -Diterations=100 -D3rdparty_libdir= \3rdPartyJars\lib
