ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 49021] TaskDef/ScriptDef in Sub Build = Memory Disaster
Date Mon, 09 Aug 2010 11:40:25 GMT

--- Comment #2 from Keith D Gregory <> 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, 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"

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

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

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:
------- You are receiving this mail because: -------
You are the assignee for the bug.

View raw message