在eclipse中建立maven webapp項目時彈出錯誤-解決辦法

來源:互聯網
上載者:User

標籤:

在eclipse中建立maven webapp項目時報錯:

Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webapp:1.0 from any of the configured repositories。

 

問題產生原因:是因為本地倉庫中缺少了maven-archetype-webapp包,也可能這個包下載不完全,比如:只有pom檔案,或只有jar包檔案等

 

【包路徑為:C:\Users\xxxx\.m2\repository\org\apache\maven\archetypes\maven-archetype-webapp\1.0

解決辦法1:

如果該路徑下的 沒有maven-archetype-webapp-1.0.jar 則刪掉整個1.0檔案夾。然後進入eclipse重新建立maven項目時  maven會自動重新下載jar檔案。

 

解決辦法2:

在一個已存在的項目中加入maven-archetype-webapp依賴

這個依賴沒什麼用,純粹是為了下載maven-archetype-webapp到本地倉庫

或者

通過其他任何方式把maven-archetype-webapp.jar 放入本地倉庫。

 

在eclipse中建立maven webapp項目時彈出錯誤-解決辦法

聯繫我們

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