Maven實戰(四)Eclipse匯入Maven webapp項目,並完成在瀏覽器上的發布__web

來源:互聯網
上載者:User

1:匯入Maven webapp項目(以extdirectspring-demo為例):

improt  ->  Maven ->Exsiting Maven Projects -->Browses 即可。

2:將Maven webapp項目轉化為eclipse web Project 項目

      右擊項目,點擊Properties->Project Facets

3 運行Maven web Project 項目

3.1 配置Run configurations,編譯extdirectspring-demo項目

   右擊項目,RUN ->Run configurations, Maven Build / New configuration ,Browse Workspace:即選中項目,Goals :  compiler ,

                       Configurations:即Maven3.0.5.ZIP壓縮包解壓的所在路徑;


注如果出現:Maven No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

解決方案:1 完成“Maven實戰(0) Eclipse maven plugin 外掛程式 安裝和配置 ”

                      2 檢查JDK    JAVA_HOME

                     3 eclipse JDK配置是否正確:進入 Window > Preferences > Java > Installed JREs > 檢查 installed JREs.這裡必須有一個JDK;進入 Window > Preferences > Java > Installed JREs > Execution Environments,選擇JavaSE-1.7(如果JDK為1.7), 在右側選擇jdk.然後在maven菜單中使用 “update project configuration”.

3.2    右擊項目,RUN ->Run configurations, Maven Build / New configuration , Goals :  tomcat:run

4 執行訪問地址:


 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.