[
http://issues.apache.org/jira/browse/GERONIMO-470?page=comments#action_12362893
]
Karl Avedal commented on GERONIMO-470:
--------------------------------------
For a general solution to this, you could instead do:
URL url = new URL("jar:" + fileURL.toString() + "!/WEB-INF/web.xml");
URLConnection urlConnection = url.openConnection();
urlConnection.setUseCaches(false); // This is the key to not locking the file
across close().
InputStream is = urlConnection.getInputStream();
// read dd
is.close();
That will not leave the file locked.
To solve this in a way that doesn't rely on turning off caching for
URLConnection is to write a better URLStreamHandler for jars than the Sun one.
> Online deployer locks module file
> ---------------------------------
>
> Key: GERONIMO-470
> URL: http://issues.apache.org/jira/browse/GERONIMO-470
> Project: Geronimo
> Type: Bug
> Components: deployment
> Reporter: Jeremy Boynes
> Fix For: 1.1
>
> If I distribute a war file using the maven plugin and the online deployer,
> the server locks the input file. The means that a second build of my app
> fails as maven cannot delete the old war.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira