在myeclipse下使用 jetty-maven-plugin的时候项目启动后无法修改静态资源文件 js,css 解决如下:
使用的是新版本9.0.3.v20130506
把jetty-webapp-9.0.3.v20130506.jar包中的webdefault.xml取出修改useFileMappedBuffer 把原来默认true改为false
pom配置plugin:
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.0.3.v20130506</version>
<configuration>
<scanIntervalSeconds>3</scanIntervalSeconds>
<webApp>
<contextPath>/</contextPath>
<defaultsDescriptor>${basedir}/src/main/webapp/WEB-INF/webdefault.xml</defaultsDescriptor>
</webApp>
</configuration>
</plugin>
把文件放在项目中的指定路径${basedir}/src/main/webapp/WEB-INF/webdefault.xml
我的项目结构路径如上,
${basedir}为项目在你电脑上的路径
解决了头疼的问题。。。希望也能帮到你