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 :-) ).
Cheers,
Antoine
[EMAIL PROTECTED] wrote:
Hello,
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 ant.apache.tools.ant.Project 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 Project.executeTarget().
However, upon running the next build, some of the installed jar files in = step 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 e-mail: [EMAIL PROTECTED] web: www.edbtelesciences.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]