eclipse建立maven錯誤訊息Could not calculate build plan: Plugin org.apache.maven.plugins:maven-war-plugin:2.

建立maven時eclipse錯誤訊息如下:

Could not calculate build plan: Plugin org.apache.maven.plugins:maven-war-plugin:2.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-war- plugin:jar:2.2

解決方式:

1.清除倉庫檔;

(預設為:C:\Users\用戶名\.m2\repository\org\apache\maven\plugins\maven-war-plugin\2.2)
 目錄下的m2e-lastUpdated.properties檔案刪除;
2.項目右鍵,Run As-->Maven clean;
3.項目右鍵,Run As-->Maven install;
4.項目右鍵,Maven-->Update Project;
5.最後刷新即可;