Eclipse中的Maven項目報錯處理方法_maven

來源:互聯網
上載者:User
1.pom檔案總是提示Missing artifact  *.jar

某些jar包,自己明明下載過。如電腦重啟後或Eclipse重啟後,pom.xml檔案提示 Missing artifact 某某jar包。

 去本地倉庫中,尋找 *.lastUpdated ,全部刪除。並在Eclipse中此項目中右鍵-->maven--> update peoject




2. Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6

此問題可能是多種原因導致,我碰到過兩次不同原因的:

第1種,是因為eclipse裡面的maven配置不知什麼時候被改了,改回正確的就可以,進入
Window -> Preferences -> Maven -> User Settings -> 選擇自己的 settings.xml

第2種不知是什麼原因,可用下面的解決辦法:

第一步:刪除本地.m2倉庫中
repository\org\apache\maven\plugins 目錄下面的所有方法;

第二步:在eclipse中右擊項目
Maven->Update Project->勾選 Force Update of Snapshots/Releases->OK.視網路情況,可能時間有點長。





3.The superclass
"javax.servlet.http.HttpServlet" was not found on the Java 

 Build Path

是當前web項目沒有配置tomcat導致的,解決之前要確保當前eclipse有配置tomcat

,再在 項目名右鍵->Properties->JavaBuildPath-> Libraries- > AddLibrary->Server Runtime  在此列表中選中你的tomcat就可以

聯繫我們

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