標籤:tt 配置 maven jetty e t tty maven jetty a
etty 是一個用 Java 實現、開源、基於標準的,並且具有豐富功能的 Http 伺服器和 Web 容器,可以免費的用於商業行為。Jetty 這個項目成立於 1995 年,現在已經有非常多的成功產品基於 Jetty,比如 Apache Geromino, JBoss, IBM Tivoli, Cisco SESM 等。Jetty 可以用來作為一個傳統的 Web 服務器,也可以作為一個動態內容伺服器,並且 Jetty 可以非常容易的嵌入到 Java 應用程式當中。
在按照這個網址http://www.ibm.com/developerworks/cn/web/tutorials/wa-aj-comet/section3.html啟動lift項目運行時,拋出這個錯誤
[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 (D:\apache-maven-3.0\repository), nexus (http://localhost:8081/nexus/content/groups/snapshot), Nexus (http://localhost:8081/nexus/content/groups/public)] -> [Help 1][ERROR][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.[ERROR][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
2.settings.xml
<pluginGroups> <pluginGroup>org.mortbay.jetty</pluginGroup> </pluginGroups> <activeProfiles> <activeProfile>nexus-local</activeProfile> </activeProfiles></settings>
注意pluginGroups的相對位置,是在</settings>之上的
最後在項目project下啟動
$ mvn jetty:run
一切正常
maven jetty配置