Java 无法在 Eclipse 中创建 Maven 项目
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/21183758/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Unable to create Maven project in eclipse
提问by Anton Zvonovsky
Don't know where the problem exactly is. When trying to create a Java Maven simple project (war, if that means anything) from scratch in Eclipse Helios (also tried Kepler) I get the messages below:
不知道具体问题出在哪里。当尝试在 Eclipse Helios(也尝试过 Kepler)中从头开始创建 Java Maven 简单项目(战争,如果这意味着什么)时,我收到以下消息:
Errors occurred during the build.
Errors running builder 'Maven Project Builder' on project 'j2eeexample'.
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5
Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5
Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5
I'm using:
我正在使用:
- m2e ver. 1.2.0.20120903-1050 (also tried to use the recent one with Kepler - got the same error)
- apache maven ver. 3.0.4 (also tried 3.1.1 with Kepler) with MAVEN_HOME and PATH set.
- jdk 1.7.0_45
OS Windows 7 Pro
mvn --version
returns quite a normal result and, I guess, is configured well.
- m2e 版本 1.2.0.20120903-1050(也尝试将最近的与开普勒一起使用 - 得到同样的错误)
- Apache Maven 版本 设置了 MAVEN_HOME 和 PATH 的 3.0.4(也用 Kepler 尝试了 3.1.1)。
- JDK 1.7.0_45
操作系统 Windows 7 专业版
mvn --version
返回一个非常正常的结果,我想,配置得很好。
I did everything the same as mr.Arthur Vin did (including preparations from previous parts of a tutorial) in here: http://youtu.be/1cHIZTmN0z8?t=4m51s
我所做的一切一样mr.Arthur Vin的那样(包括教程之前的部分准备工作)在这里:http://youtu.be/1cHIZTmN0z8?t=4m51s
But it doesn't work.
但它不起作用。
采纳答案by Lucas Eduardo
The problem is that you don't have maven-resources-pluginand maven tried to download it. If you are under a proxy, configure the proxy in your maven settings.xmlfile. If you are not under a proxy, try to download maven again and replace your current installation. May be a local issue with your firewall, well you need to check your internet access.
问题是你没有maven-resources-plugin并且 maven 试图下载它。如果您使用代理,请在您的 maven settings.xml文件中配置代理。如果您不在代理下,请尝试再次下载 maven 并替换您当前的安装。可能是您的防火墙的本地问题,您需要检查您的互联网访问。