mvn jetty:run出错,提示没有找到插件.

[ERROR] No plugin found for prefix 'jetty' in the current project and in the plu
gin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repo
sitories [local (C:\Documents and Settings\Administrator\.m2\repository), centra
l (http://repo.maven.apache.org/maven2)] -> [Help 1]


这时如果在maven的settings.xml没有配置插件应此需要
mvn org.mortbay.jetty:maven-jetty-plugin:run 这样来运行。
如果需要使用jetty:run,那么必须在maven的setting.xml下配置
<pluginGroups>
    <pluginGroup>org.mortbay.jetty</pluginGroup>
  </pluginGroups>

在eclipse中用jetty调试可参考

1.http://www.blogjava.net/alwayscy/archive/2007/05/19/118584.html

2.http://www.blogjava.net/alwayscy/archive/2007/09/13/144969.html

 

maven的jetty插件在控制台输出中文乱码(System.out.println也是):

eclipse 中调试项目不能保存静态资源如js,css等,需要修改jetty的webdefault.xml文件,将其复制到src/main/resources下再修改useFileMappedBuffer为false,最后在pom中修改jetty的plugin设置<plugin>.....<configuration><webDefaultXml>src/main/resources/webdefault.xml</webDefaultXml></configuration>......</plugin>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值