Could not calculate build plan

在eclipse下用maven新建web項目,新建過程當中,報異常以下: java

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 web

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 apache

這一問題出現的緣由本身的maven本地倉庫中該文件夾:org/apache/maven/plugins/maven-war-plugin/2.2下,maven-war-plugin-2.2.jar缺失,或缺乏maven-war-plugin-2.2.pom,造成這個的緣由多半是網速等緣由致使的jar包未成功下載和.pom文件內容不是xml格式的,這時要刪除該文件夾下的未成功下載的後綴爲.lastUpdated的文件和不合規範的.pom文件,若重來仍然出現這個問題,那麼就本身手動下載maven-war-plugin-2.2.jar放至該文件夾,同時下載maven-war-plugin-2.2.pom,這時要注意該文件的後綴是.pom,網頁查找maven-war-plugin-2.2.pom,打開是xml文件,另存爲也會默認.xml格式,這時要將後綴改成.pom,而後也一併放在該文件夾下。 eclipse

最後從新新建便可。 maven

同時要注意:相似的Could not calculate build plan 都是由於jar包和相關的pom文件未成功下載致使的。 ui

我在從新新建後陸續又碰到了以下異常: spa

1. code

Failure to transfer com.thoughtworks.xstream:xstream:pom:1.3.1 from http://mirrors.ibiblio.org/maven2/ was cached in the local repository, resolution will not be reattempted until the update interval of ibiblio has elapsed or updates are forced. Original error: Could not transfer artifact com.thoughtworks.xstream:xstream:pom:1.3.1 from/to ibiblio (http://mirrors.ibiblio.org/maven2/): unexpected end of stream on Connection{maven.ibiblio.org:80, proxy=DIRECT hostAddress=169.55.155.238 cipherSuite=none protocol=http/1.1} (recycle count=0)


2. xml

Failure to transfer com.thoughtworks.xstream:xstream-parent:pom:1.3.1 from http://mirrors.ibiblio.org/maven2/ was cached in the local repository, resolution will not be reattempted until the update interval of ibiblio has elapsed or updates are forced. Original error: Could not transfer artifact com.thoughtworks.xstream:xstream-parent:pom:1.3.1 from/to ibiblio (http://mirrors.ibiblio.org/maven2/): connect timed out

3. ip

Failure to transfer org.apache.maven.shared:maven-filtering:pom:1.0-beta-2 from http://mirrors.ibiblio.org/maven2/ was cached in the local repository, resolution will not be reattempted until the update interval of ibiblio has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.shared:maven-filtering:pom:1.0-beta-2 from/to ibiblio (http://mirrors.ibiblio.org/maven2/): Software caused connection abort: recv failed

這些也是由於相關的jar包和pom文件未成功下載致使的,一一解決便可。

相關文章
相關標籤/搜索