maven jetty配置

來源:互聯網
上載者:User

標籤: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配置

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.