简体   繁体   English

无法在Eclipse中创建Maven项目

[英]Unable to create Maven project in eclipse

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中从头开始创建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. M2E版本 1.2.0.20120903-1050 (also tried to use the recent one with Kepler - got the same error) 1.2.0.20120903-1050(也尝试与Kepler一起使用最近的版本-出现相同的错误)
  • apache maven ver. apache Maven版本 3.0.4 (also tried 3.1.1 with Kepler) with MAVEN_HOME and PATH set. 设置了MAVEN_HOME和PATH的3.0.4(在开普勒中也尝试过3.1.1)。
  • jdk 1.7.0_45 jdk 1.7.0_45
  • OS Windows 7 Pro 操作系统Windows 7 Pro

     mvn --version 

    returns quite a normal result and, I guess, is configured well. 返回相当正常的结果,并且我认为配置正确。

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. 但这是行不通的。

The problem is that you don't have maven-resources-plugin and maven tried to download it. 问题是您没有maven-resources-plugin,而maven尝试下载它。 If you are under a proxy, configure the proxy in your maven settings.xml file. 如果您使用代理,请在您的maven settings.xml文件中配置代理。 If you are not under a proxy, try to download maven again and replace your current installation. 如果您不在代理下,请尝试再次下载maven并替换当前的安装。 May be a local issue with your firewall, well you need to check your internet access. 防火墙可能是本地问题,所以您需要检查Internet访问。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM