怎么排除maven依赖 怎么排除maven依赖

怎么排除maven依赖

当我们项目中引入其他模块时,就会产生依赖冲突,发生冲突会产生类似的报错:An attempt was made to call a method that does not exist. The attempt was made from the following

下面记录一下如何解决依赖冲突

1.下载maven helper插件

2.查看依赖冲突

然后我们可以看到下面这张图,这种红色的就是产生冲突的地方

3.解决冲突

点击pom文件,再选择Dependency Analyzer

点击Confilcts,再Refresh UI刷新一下,就可以看到所有冲突了

接下来排除依赖,选中红色有冲突的依赖,右击,点击Exclude排除掉,框里的都是冲突的都需要排除

然后回到pom,会看到已经把冲突排除了,记得刷新一下maven

作者:老菜鸡w原文地址:https://blog.csdn.net/weixin_45132964/article/details/127332503

%s 个评论

要回复文章请先登录注册