Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

File locking in Windows with Jetty 9 and Maven plugin

There is a lot of information available on the this subject, but I can't get it to work in Jetty 9. The most recent approach I found was: Jetty Maven Plugin is ignoring custom webdefault.xml

I extracted the webdefault.xml from my maven repository. Then I set useFileMappedBuffer to false and placed it within 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 my webdefault.xml is referenced:

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

But I still have file locking issues in Windows (using IntelliJ IDEA 11). Does anyone know a solution?

like image 719
Michiel Avatar asked Dec 30 '12 14:12

Michiel


2 Answers

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

I've proposed a patch and hope it will be fixed before the release :)

like image 102
Michiel Avatar answered Oct 18 '22 04:10

Michiel


I downgraded to

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

Which still respects the web default.

like image 33
Will Avatar answered Oct 18 '22 03:10

Will