Windows file locking with Jetty 9 and the Maven plugin

There is a lot of information on this topic, but I can’t get it to work in Jetty 9. The most recent approach I have found is: Jetty Maven plugin ignoring custom webdefault.xml

I extracted the webdefault.xml file from my maven repository. Then I set useFileMappedBuffer to false and put it in my project as jetty-maven-plugin-webdefault.xml .

 <plugin> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> <version>9.0.0.M4</version> <configuration> <webAppConfig> <defaultsDescriptor>src/main/resources/jetty-maven-plugin-webdefault.xml<</defaultsDescriptor> </webAppConfig> </configuration> </plugin> 

When I execute jetty:run , I see that my webdefault.xml is referenced:

 [INFO] Web defaults = src/main/resources/jetty-maven-plugin-webdefault.xml 

But I still have problems locking files on Windows (using IntelliJ IDEA 11). Does anyone know a solution?

+7
source share
2 answers

After digging a little deeper, I found an error in Jetty 9.0.0.M4, forcing it to ignore the useFileMappedBuffer parameter: https://bugs.eclipse.org/bugs/show_bug.cgi?id=395885

I suggested the patch and hope it will be fixed before the release :)

+5
source

I lowered to

 <dependency> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> <version>8.1.8.v20121106</version> </dependency> 

Which is still the default web.

+4
source

All Articles