Hi,
I think it's the same problem. I used the following workaround before:
public class JarInputStream extends InputStream {
private JarFile jarFile;
private InputStream is;
public JarURLInputStream(URL url) throws IOException {
String protocol = url.getProtocol();
if (protocol != null && (protocol.equals("jar") ) {
String urlStr = url.toString();
JarURLConnection connection = (JarURLConnection) url.openConnection();
// We cannot use cache, otherwise the JAR file will be cached
connection.setUseCaches(false);
is = connection.getInputStream();
jarFile = connection.getJarFile();
} else {
is = url.openStream();
}
}
...
public void close() throws IOException {
if(is != null) is.close();
// We need to close the JAR file
if (jarFile != null) jarFile.close();
}
...
}
Thanks,
Raymond
----- Original Message -----
From: "Tarun Ramakrishna" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, November 13, 2006 10:49 AM
Subject: Re: Tuscany Java M2 - unnecessary maven-plugin jars and file-lock
slow down webapp deployment time.
Hi Jeremy,
My response comes late - but thanks a lot for your answers!
Are you running on Windows? This may not be an issue with the Maven
support but a side effect of the classloader - IIRC URLClassLoader
can take locks on the underlying file and not release them. I've not
seen any issue on OSX with deploy/undeploy cycles.
I didn't know about the URLClassLoader bug.
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5041014. This is
rather awful. If they atleast had a close() method, one could write
some code for the tomcat context undeploy event.
Need to think of some hack...don't have choice in our development
platform at work at the moment.
Regards,
Tarun
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]