当前位置:网站首页>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可以更加直观的看到是什么依赖导致的问题。

边栏推荐
- Keep your Eyes on the Lane: Real-time Attention-guided Lane Detection
- Huawei device remote login (Telnet, SSH) configuration
- serialization and deserialization
- Chapter 3 business function development (query clues)
- 【无标题】
- Summary of SQL skills in data warehouse development
- Implementation of depth first and breadth first traversal of binary tree
- C语言基础
- @Principle of Autowired annotation
- [shader realizes shadow projection effect _shader effect Chapter 8]
猜你喜欢

Svg creative underline style JS special effect

Graduation design of wechat small program ordering system of small program completion works (3) background function

"Unable to recognize" yarn "item as cmdlet, function, script file

Implementation of depth first and breadth first traversal of binary tree
![[dark horse programmer] redis learning notes 003: redis transactions](/img/c4/a7fcb3bc65d4013b3817c6115ce061.png)
[dark horse programmer] redis learning notes 003: redis transactions

@The difference and use of value and configurationproperties

【黑马程序员】Redis学习笔记004:主从复制+哨兵模式+集群

Redis分片集群

华为设备远程登录(Telnet、SSH)配置

第3章业务功能开发(实现全选按钮实时的响应)
随机推荐
[Sesame Street family] & Bert Bart Roberta
R language error
Graduation project of wechat small program ordering system of small program completion works (4) opening report
【5G NR】3GPP常用协议整理
Database persistence +jdbc database connection
一次简单的SQL注入靶场练习
Redis4.0.14 sentinel automatic failover failed
第3章业务功能开发(实现全选按钮实时的响应)
Graduation design of wechat small program ordering system of small program completion works (3) background function
华为设备远程登录(Telnet、SSH)配置
JS cool rolling picture deformation animation JS special effects
Initial knowledge of WebService (generate jar packages and call methods in remote services)
JS typewriter animation JS special effect plug-in autotyperjs
PHP gets all child nodes under any parent node of the tree structure
Redis fragment cluster
Keep your Eyes on the Lane: Real-time Attention-guided Lane Detection
Bigdecimel in words
[dark horse programmer] redis learning notes 003: redis transactions
本周大新闻|FCC曝光Pico 4 VR一体机,雷朋母公司建立智能眼镜实验室
CentOS 8.2 MySQL installation (xshell6)