2017-08-31 156 views
1

我剛剛創建了一個新的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 

我不明白爲什麼,因爲我的天堂」不要碰任何東西或其他東西。

你有什麼想法嗎?

+0

代理/防火牆問題... – khmarbaise

回答

2

Maven嘗試從MavenCentral下載插件,但失敗。這通常是網絡或代理問題。

+0

如果我無法更改網絡或代理,是否有解決方案? – celianou

+1

您可以將代理配置放入settings.xml –

+0

您是否有示例? – celianou

0

從錯誤消息中,也許這個存儲庫http://repo.maven.apache.org/maven2沒有爲您找到,您可以在互聯網上搜索可用的存儲庫。