当前位置:网站首页>IDEA下依赖冲突解决方法
IDEA下依赖冲突解决方法
2022-07-25 08:39:00 【李振华的博客】
首先我们需要知道的是依赖是依据Maven坐标定位的,而Maven坐标主要是由GAV(groupId、artifictId、version)构成。
如果你的本地Maven仓库有两个相同的依赖包,即使里面只有啥坐标都不一样,但Maven认为这两个依赖包依然是不同的。这样两个依赖包就会出现冲突。
如下,先点击Maven插件的show dependencies,然后发现swagger models依赖出现了两个,并且这两个依赖的版本是不同的,因此两者之间会发生冲突。
我们再看到自己本地Maven仓库也可以发现有两个不同版本的swagger-models依赖包


我解决这两个冲突是直接使用plugin插件中的maven-helper

这样下面就会出现Dependency Analyser(依赖分析)

我们直接点击Dependency Analyser,点击Conflicts冲突选项,就可以发现产生冲突的依赖是哪一个,在这里,是swagger-model依赖版本之间产生冲突,然后我们可以在maven插件中找到这两个依赖所在的位置


我们可以直接在发生依赖冲突的依赖上右键点击Exclude,去除该依赖

然后我们在点击refresh Ui,就会发现依赖冲突没有了,并且在maven插件中的依赖也消失了。


然后会发现原来引入冲突的依赖中加了一个Exclude标签
如果我们知道是该依赖引起的问题,也可以直接加入消除,但通过maven-helper可以更加直观的看到是什么依赖导致的问题。

边栏推荐
- 第3章业务功能开发(查询线索)
- Blue and white porcelain used by Charles
- Review the second time, 220614, video, day03_ Data warehouse design,
- @Principle of Autowired annotation
- Talk about your transformation test development process
- Redis学习
- CentOS 8.2 MySQL installation (xshell6)
- Rstudio shows that it can't connect to the web page, or it has a new website.
- Keep your Eyes on the Lane: Real-time Attention-guided Lane Detection
- 25位撤销博士学位
猜你喜欢
![[dark horse programmer] redis learning notes 005: enterprise level solutions](/img/76/959d18994ab9eb170cbdbdccbe94e7.png)
[dark horse programmer] redis learning notes 005: enterprise level solutions

A powerful port scanning tool (nmap)

一次简单的SQL注入靶场练习

Basis 33: XPath acquisition methods of page elements under various browsers

公寓报修系统(IDEA,SSM,MySQL)
![RTOS series (13): assembly LDR instruction, LDR pseudo instruction, [rn] register indirect reference detailed analysis](/img/87/d116e729c771fcf3ce95958a45d85f.png)
RTOS series (13): assembly LDR instruction, LDR pseudo instruction, [rn] register indirect reference detailed analysis

【无标题】

When testing VPN, the IP found by the command line is inconsistent with that of Baidu search

一款强大的端口扫描工具(nmap)

25 Ph.D. degrees revoked
随机推荐
孙子兵法随感
NVIDIA可编程推理加速器TensorRT学习笔记(二)——实操
IP command usage details
Raspberry pie creation self start service
本周大新闻|FCC曝光Pico 4 VR一体机,雷朋母公司建立智能眼镜实验室
When testing VPN, the IP found by the command line is inconsistent with that of Baidu search
Swift initializer and optional chain
C语言基础
When crontab scheduled task executes jar through script, it encounters a pit where jar package execution is invalid
Implementation of depth first and breadth first traversal of binary tree
智能运维场景解析:如何通过异常检测发现业务系统状态异常
Blue and white porcelain used by Charles
FreeMaker模板引擎
【黑马程序员】Redis学习笔记003:Redis事务
@Use of Autowired
Chapter 3 business function development (query clues)
【5G NR】3GPP常用协议整理
OpenGL es to achieve the effect of "big head, small head" and "head shaking"
Tips for improving code sustainability, take connectto method as an example.
Raspberry pie CM4 -- using metartc3.0 to integrate ffmpeg to realize webrtc push-pull streaming