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

边栏推荐
- Blue and white porcelain used by Charles
- Idea starts the project slowly
- Wechat reservation applet graduation design of applet completion works (2) applet function
- FreeMaker模板引擎
- @The difference and use of value and configurationproperties
- serialization and deserialization
- Wechat applet ordering system graduation design of applet completion works (8) graduation design thesis template
- 【keras bug】Tensor is unhashable if Tensor equality is enabled. Instead, use tensor.experimental_ ref(
- Freemaker template engine
- Raspberrypico serial communication
猜你喜欢

This week's big news | FCC exposed Pico 4 VR all-in-one machine, and leipeng's parent company established a smart glasses laboratory

Brush the title "sword finger offer" day01

Chapter 3 business function development (modifying clues, data echo and modifying data)

Numpy learning

@The difference and use of value and configurationproperties

Wechat Reservation Reservation of applet completion works applet graduation project (8) graduation project thesis template

Redis best practices

Centernet network structure construction

Idea failed to start the project yamlexception Chinese file encoding format

Brush the title "sword finger offer" day02
随机推荐
Online shopping E-commerce mall system based on jsp+servlet+mysql+
Raspberry pie 4B parsing PWM
一次简单的SQL注入靶场练习
Chapter 3 business function development (realize the real-time response of the select all button)
Freemaker template engine
Wechat applet ordering system graduation design of applet completion works (2) applet function
C语言基础
第3章业务功能开发(修改线索,数据回显并修改数据)
016 fundamentals of machine learning mathematics: Introduction
Swift initializer and optional chain
Data warehouse ODS, DWD floor, 220616, HM,
NVIDIA可编程推理加速器TensorRT学习笔记(二)——实操
@Autowired的使用
本周大新闻|FCC曝光Pico 4 VR一体机,雷朋母公司建立智能眼镜实验室
This week's big news | FCC exposed Pico 4 VR all-in-one machine, and leipeng's parent company established a smart glasses laboratory
Centernet network structure construction
Ensembles in RNA counts data in TCGA_ ID to gene_ Method of ID
Message Oriented Middleware
Graduation design of wechat small program ordering system of small program completion works (5) assignment
JD cloud and Forrester consulting released a hybrid cloud report that cloud Nativity has become a new engine driving industrial development