关于这个主题有很多可用的信息,但我无法在 Jetty 9 中使用它。我发现的最新方法是:Jetty Maven Plugin is ignoring custom webdefault.xml
我从我的 Maven 存储库中提取了 webdefault.xml。然后我设置 useFileMappedBuffer
至 false
并将其作为 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>
当我执行
jetty:run
,我看到我的 webdefault.xml 被引用:[INFO] Web defaults = src/main/resources/jetty-maven-plugin-webdefault.xml
但是我在 Windows 中仍然有文件锁定问题(使用 IntelliJ IDEA 11)。有谁知道解决方案?
最佳答案
深入挖掘后,我发现 Jetty 9.0.0.M4 中的一个错误导致它忽略了 useFileMappedBuffer 参数:https://bugs.eclipse.org/bugs/show_bug.cgi?id=395885
我已经提出了一个补丁,希望它会在发布前修复:)
关于maven - 使用 Jetty 9 和 Maven 插件在 Windows 中锁定文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14091365/