> -----Original Message-----
> From: Langanke, Frank [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, 17 August 2006 9:23 PM
> To: user@ant.apache.org
> Subject: Cannot delete file from classpath.
> 
> Hi,
> 
> I have a project A which depends on a jar from another 
> project B. The problem is that I got the jar from project B 
> in the classpath of project A; at start my clean target tries 
> to delete the jar but fails because the file is in the 
> classpath. I don't know how to update the jar (how to delete it).

Frank:

If your running on windows the normal behaviour is that if you create a
classloader referencing a jar, the classloader maintains an open file
reference preventing the file from deletion.  The only way around this is to
ensure that you don't hold a reference to the file unless your actually
using it.  You can achieve this by separating your build into two distinct
projects where B is build before project A and project A references the jar
file produced by B  under an appropriate path statement.  You then need to
define project X which does the sequencing of B then A.

Cheers, Steve.


--------------------------
Stephen McConnell
mailto:[EMAIL PROTECTED]
http://www.dpml.net
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to