Maven新建项目报错

来源:互联网 发布:手机围棋记谱软件 编辑:程序博客网 时间:2024/05/16 12:36
报错: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


这个错误导致我重新装了遍虚拟机,因为我本来已经装了Mvn,也许是eclipse中新建的Maven项目的版本和我安装的不一样。

后来从网上找了好多资料,总结得是:

首先:查看window-》preferences-》maven的settings.xml文件中的.m2的位置

2、将.m2中的plugins目录中的文件全部删除,因为联网后eclipse会自动关联和下载相关的maven,给plugins目录在

.m2/repository/org/apache/maven/plugins,文件夹下的内容全部删除

3、eclipse中新建maven项目,然后右键maven-》update,eclipse会自动重新下载maven所依赖的包。


linux下的eclipse自带maven插件,只需要联网即可自动关联下载,不需要安装maven

0 0