This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
How To: Fix file locking problem with jetty:run in Windows
Overview
If you happen to be developing under windows you will notice that mvn jetty:run locks files and prevents editing while the server is running. Super annoying. The problem is that jetty memory maps files by default and windows locks memory mapped files.
The problem is discussed in slightly more detail here: When using jetty:run, CSS and JavaScript files are locked – how can I fix this?
Solution
- extract webdefault.xml from jetty.jar
jar -xvf ~/.m2/repository/org/mortbay/jetty/jetty/6.1.16/jetty-6.1.16.jar org/mortbay/jetty/webapp/webdefault.xml
- move to test/resources
mv org/mortbay/jetty/webapp/webdefault.xml src/test/resources/
- change useFileMappedBuffer flag to false in webdefault.xml
<param-name>useFileMappedBuffer</param-name> <param-value>false</param-value> - tell mvn jetty plugin to use that file in your pom.xml:
<plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>maven-jetty-plugin</artifactId> <configuration> <webDefaultXml>src/test/resources/webdefault.xml</webDefaultXml> ... - feel your productivity elevated







