ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Denis N. Antonioli <antoni...@ifi.unizh.ch>
Subject Re: OutOfMemoryException on large build
Date Sat, 21 Feb 2004 07:41:34 GMT

On 20 févr. 04, at 23:18, Jeremy Haile wrote:

> We have a fairly long build process.  Currently our project consists of
> many modules, each with their own build.xml file.  There is also a 
> master
> build.xml file that calls each module build.xml sequentially (in order 
> of
> module dependencies).
>
> A typical module target in the master build.xml looks like:
>
> <target name="event_mgmt" description="Event management" 
> depends="sysmgr"
>>
>         <echo message="Building Event Management module" />
>         <ant dir="${src.dir}/event_mgmt"
>                 target="${target}" inheritAll="false" />
> </target>

Are your modules' build.xml <taskdef>ing something?
We found with ant 1.5.1 that each taskdef reads the referenced jar file 
in memory and never release it.
The solution we applied is to put the referenced jar file on the 
classpath before starting ant. That way,
the <taskef> only makes the names of the task available but doesn't 
read the jar file again and again.
This not only reduces the memory usage, it also speeds up the build 
process noticeably!

best
	dna
-- 
The Laws of Computer Programming
* Main Law *
If anything can go wrong, it will.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message