ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Levy-Lambert <>
Subject Re: File locking problem using
Date Mon, 27 Dec 2004 15:09:56 GMT
Hello Helge,

I am not sure how you solve this problem. It might be caused by <javac/> 
(the compilation task) not
releasing file locks.
You can try to use <javac fork="true"/> which means you are going to 
compile out of process, so in
this case the compiler is not going to hold the lock for long.

Otherwise, I am not sure which API methods would be the best. Maybe 
project = null; and then System.gc(); would make your system
release all objects created by ant.

(I am sure that other folks on the list will have better ideas :-) ).


Antoine wrote:

>We are using the ant API for making automated builds via a custom made = web
>build server,=20 and have encountered a tricky problem with file locking.
>Our build process on a Windows 2003 server is as follows:
>1) First checking out source via CVS.
>2) Installing misc. jars etc into a release directory by simply using = the
>copy ant target.
>3) Using the ant class for exection of ant
>targets on our source files.
>4) Making some release tar/exe files for distribution.
>All these tasks are defined in ant targets which is executed by the
>However, upon running the next build, some of the installed jar files in =
>2) has a file lock,
>which forces us to restart the build server to release the lock. I do = use
>the Project methods
>                project.fireBuildFinished(throwable);
>                project.removeBuildListener(htmlLogger);
>to release resources on the project class.
>Any suggestions?
>Helge Fredriksen, System Developer
>Dreyfushammarn 35
>NO-8002 BOD=D8
>Direct line: +47 75512482
>Switchboard: +47 75512400
>Fax: +47 75512401
>Mobile: +47 90972759

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message