ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Ant project question
Date Thu, 11 Apr 2002 11:12:21 GMT
On Thu, 11 Apr 2002, Detlef Brendle <detlef.brendle@canoo.com> wrote:

> At the second time Ant cannot delete certain files (jar files for
> compiling the project).
> 
> My idea was to set the project instance to null after beeing used -
> but this doesnt help me.

You should make sure that Project#fireBuildFinished has been called -
this one will trigger a cleanup in all classloaders Ant has
instantiated.  Also put a System.gc after setting project to null.

But it may not be enough even after that.  The Java VM itself is known
to not close jar files that are on the classpath, so you cannot delete
those files as long as your Java VM is running.

Can you spawn separate VMs for your Ant runs so that you gert a chance
to clean up?

Stefan

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


Mime
View raw message