如今Jetty的版本已經到9了,也早已經在Eclipse的門下了。因此有不少groupId,好比:org.eclipse.jetty、org.mortbay.jetty.這些均可以用的哦。apache
我在使用MyEclipse結合maven操做jetty做爲開發的服務器,這開開發比較方便。
服務器
當我運行命令:
eclipse
jetty:run
maven
出現:ide
[ERROR] No plugin found for prefix 'jetty' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (F:\Java\maven\repository), central (http://repo.maven.apache.org/maven2)] -> [Help 1]網站
[ERROR] spa
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.插件
[ERROR] Re-run Maven using the -X switch to enable full debug logging.debug
[ERROR] code
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException
這樣的問題,其實就是說,maven不知道這個插件在哪裏,因此咱們須要配置或者加參數。
解決:
方法1:
執行的時候是這樣的:
mvn org.mortbay.jetty:maven-jetty-plugin:run
或:
mvn org.eclipse.jetty:maven-jetty-plugin:run
方法2:
在maven的配置文件插件組上添加插件:
<pluginGroups>
<pluginGroup>org.mortbay.jetty</pluginGroup>
</pluginGroups>
或:
<pluginGroups>
<pluginGroup>org.eclipse.jetty</pluginGroup>
</pluginGroups>
這樣就能夠解決!
本人我的網站:http://www.verysu.com
【歡迎各位瀏覽,若是你有什麼好的工做請介紹,或者您是HR但願您好好看看,謝謝!】