新建maven项目,pom文件报错

来源:互联网 发布:mysql的sql语句 编辑:程序博客网 时间:2024/05/17 04:47

在IDE中新建maven项目,pom文件报错!

bug描述:

Failure to transfer org.apache.maven.plugins:maven-surefire-plugin: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:maven-surefire-plugin: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:maven-compiler-plugin: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:plexus-compiler-manager: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:plexus-compiler-manager: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:plexus-compiler-manager: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:plexus-compiler-manager: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:maven-compiler-plugin:2.3.2:testCompile (execution: default-testCompile, phase: test-compile)

解决方案:

这个bug是因为选用的maven版本过高了,从官网上下载一个较低版本(本人选用的是3.0.5)就可以解决这个问题了!




0 5
原创粉丝点击