在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文件未成功下载致使的,一一解决便可。