将maven项目加载到eclipse时出错 [英] error while loading maven project into eclipse

查看:144
本文介绍了将maven项目加载到eclipse时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Maven 2.2.0和Eclipse Juno。我正在尝试将现有的Maven项目中的一个导入工作空间。



我收到以下错误。

 无法计算构建计划: 
插件org.apache.maven.plugins:maven-resources-plugin:2.5或其一个依赖关系无法解析:
无法读取org.apache.maven.plugins的artifact描述符:maven-资源插件:jar:2.5



插件org.apache.maven.plugins:maven-resources-plugin:2.5或其一个依赖关系无法解析:
无法读取org.apache.maven.plugins的工件描述符:maven-resources-plugin:jar:2.5

然后我尝试运行clean install命令。



构建成功。



甚至之后,我面临同样的错误。



可以帮助我解决这个问题。



谢谢

解决方案

我刚刚解决了这个问题。



添加< localRepository> $ {user.home} /。m2 / reposi tory< / localRepository>



如我所见,2.5文件夹已经存在于.m2存储库中,所以添加了这个,以便再次从存储库重新下载。 / p>

在eclipse - 窗口 - pref - maven - 检查settings.xml 的路径。它应该是有效的路径。



它解决了我的问题。


I am using Maven 2.2.0 and Eclipse Juno. I am trying to import one of the existing Maven project into workspace.

I got following error.

  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

Then I tried running clean install command.

And the build is successful.

Even after that, I am facing same error.

Can any one help me the solution for this.

Thanks in Advance.

解决方案

I just got solution to this question.

Added <localRepository>${user.home}/.m2/repository</localRepository>

As I see 2.5 folder already exist in .m2 repository, so added this to stop downloading from repository again.

In eclipse--window--pref--maven--check the path for settings.xml. Its should be valid path.

It resolved my problem.

这篇关于将maven项目加载到eclipse时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆