Java学习之Eclipse创建maven项目报错:Could not calculate build plan: Plugin
【摘要】 问题描述在创建或者导入Maven工程包时,出现如下错误:Could not calculate build plan: Plugin org.apache.maven.plugins:maven-war-plugin:3.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor...
问题描述
在创建或者导入Maven工程包时,出现如下错误:
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-war-plugin:3.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-war-plugin:jar:3.1
Plugin org.apache.maven.plugins:maven-war-plugin:3.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-war-plugin:jar:3.1
解决方式:
(1)清除错误仓库:
查看windows -> Preferences -> maven 的settings.xml文件中.m2的位置:
(默认为:C:\Users\用户名\.m2\repository\org\apache\maven\plugins\maven-war-plugin\3.1)
目录下的m2e-lastUpdated.properties文件;
或者直接将plugins目录下文件夹删除
(2)项目右键,Run As-->Maven clean
(3)项目右键,Maven-->Update Project 重新下载依赖包
(4)刷新工程即可
【版权声明】本文为华为云社区用户原创内容,未经允许不得转载,如需转载请自行联系原作者进行授权。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
评论(0)