Xebia has published a very nice article (Maven, jetty plugin et section mappée – French) explaining how to fix the long-standing locking file issue affecting Jetty / Maven users on Windows.
On this platform, Jetty locks all .js or .css files, making it impossible to change their content while the server is still running. This is a big loss of time because you always have to stop/restart jetty to update one of these files.
Note: this issue does not occur on Linux or Mac OSX so I personnaly don’t really care, but for the ones still running on Windows, the post provides 2 possible fixes :
- 1 – Changing the connector : this one did not work for us, Jetty was no longer starting (Class not found).
- 2 – Overriding the defaut web context (webdefault.xml) : it does the trick, Great !
As a result, this is the steps that worked for us :
See original post for additionnal details.