新建maven项目,pom文件报错
在IDE中新建maven项目,pom文件报错!
bug描述:
Failure to transfer org.apache.maven.plugins
pom:2.10 from http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be
reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins
pom:2.10
from/to central (http://repo.maven.apache.org/maven2): connection timed out to http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/2.10/maven-
surefire-plugin-2.10.pom
-——————————————————————————————————————————————————————————————————————————————————————————————————————————————
Multiple annotations found at this line:
- Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins
2.3.2:compile (execution: default-compile, phase: compile)
- CoreException: Could not get the value for parameter compilerId for plugin execution default-testCompile: PluginResolutionException: Plugin org.apache.maven.plugins:maven-
compiler-plugin:2.3.2 or one of its dependencies could not be resolved: Failure to transfer org.codehaus.plexus
jar:1.8.1 from http://repo.maven.apache.org/
maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer
artifact org.codehaus.plexus
jar:1.8.1 from/to central (http://repo.maven.apache.org/maven2): connection timed out to http://repo.maven.apache.org/maven2/
org/codehaus/plexus/plexus-compiler-manager/1.8.1/plexus-compiler-manager-1.8.1.jar
- CoreException: Could not get the value for parameter compilerId for plugin execution default-compile: PluginResolutionException: Plugin org.apache.maven.plugins:maven-
compiler-plugin:2.3.2 or one of its dependencies could not be resolved: Failure to transfer org.codehaus.plexus
jar:1.8.1 from http://repo.maven.apache.org/
maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer
artifact org.codehaus.plexus
jar:1.8.1 from/to central (http://repo.maven.apache.org/maven2): connection timed out to http://repo.maven.apache.org/maven2/
org/codehaus/plexus/plexus-compiler-manager/1.8.1/plexus-compiler-manager-1.8.1.jar
- Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins
2.3.2:testCompile (execution: default-testCompile, phase: test-compile)
解决方案:
这个bug是因为选用的maven版本过高了,从官网上下载一个较低版本(本人选用的是3.0.5)就可以解决这个问题了!
还没有评论,来说两句吧...