https://issues.apache.org/bugzilla/show_bug.cgi?id=49021

--- Comment #2 from Keith D Gregory <[email protected]> 2010-08-09 07:40:18 
EDT ---
I ran into a similar problem. It appears that <taskdef> creates a new
classloader every time (makes sense), but uses the J2EE delegation model and
doesn't tie that classloader to the task/project that created it (doesn't make
sense to me, but there might be a reason). So the classes never get GC'd. A
longer writeup is on blog.kdgregory.com, today's date.

There is a work-around: use Groovy via antlib, just like you're already doing
with ant-contrib. Change your <project> element like this:

<project name="GroovyMem" default="all"
         xmlns:antc="antlib:net.sf.antcontrib"
         xmlns:groovy="antlib:org.codehaus.groovy">

Then delete all of the <taskdef>s, and refer to the Groovy tasks using the
namespace prefix:

   <target name="run_groovy">
            <groovy:groovy>
               // do nothing
            </groovy:groovy>               
   </target>

Note that you will have to add Groovy to Ant's runtime classpath. My preferred
way to do this is with the "-lib" command-line option.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to