无法在创建maven项目时计算构建计划

时间:2017-08-31 09:22:36

标签: java eclipse maven

我刚创建了一个新的maven项目,在创建时,我已经有了一个错误:

Description Resource    Path    Location    Type
CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:2.3.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:2.3.2: ArtifactResolutionException: Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:pom:2.3.2 from/to central (http://repo.maven.apache.org/maven2): null to http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/2.3.2/maven-compiler-plugin-2.3.2.pom pom.xml /WD_Automation  line 1  Maven Project Build Lifecycle Mapping Problem
Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (execution: default-compile, phase: compile)  pom.xml /WD_Automation  line 1  Maven Project Build Lifecycle Mapping Problem
CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:2.3.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:2.3.2: ArtifactResolutionException: Failure to transfer org.apache.maven.plugins:maven-compiler-plugin:pom:2.3.2 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-compiler-plugin:pom:2.3.2 from/to central (http://repo.maven.apache.org/maven2): null to http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/2.3.2/maven-compiler-plugin-2.3.2.pom    pom.xml /WD_Automation  line 1  Maven Project Build Lifecycle Mapping Problem
Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:2.3.2:testCompile (execution: default-testCompile, phase: test-compile) pom.xml /WD_Automation  line 1  Maven Project Build Lifecycle Mapping Problem

我不明白为什么,因为我没有碰到任何东西在pom或其他任何东西。

你有什么想法吗?

3 个答案:

答案 0 :(得分:2)

Maven尝试从MavenCentral下载插件,但失败了。这通常是网络或代理问题。

答案 1 :(得分:0)

从错误消息中,您可能无法访问此存储库http://repo.maven.apache.org/maven2,您可以在互联网上搜索可用的存储库。

答案 2 :(得分:0)

我用Eclipse Photon 4.8.0用java8补丁替换了Eclipse Kepler 4.3.2 SR2,问题就消失了。