Java project uses intellij-IDEA to check whether there is a conflict in the version of the dependency package (method and tool) with a screenshot

related background

Compiler and version idea-ultimate
dependency management tool maven

The first one is the idea itself

Step1: Click maven on the right

Please add a picture description

Step2: Right-click on dependencies, click Analyze Dependencies

insert image description here

Step3: You can switch in the module name position, and the triangle mark on the left indicates that the package has introduced multiple versions and there is a conflict

insert image description here

Step4: You can see that the current package has been introduced into two versions

insert image description here

Step5: Right-click the conflicting package name, you can see two options:

Open maven configuration refers to opening the pom file of the seclib package
Go to maven dependencies refers to jumping to the position where the module pom references seclib
insert image description here

Step6: Just exclude unnecessary dependencies in pom

insert image description here

The second is the Idea plugin

Step1: You need to download the little thing Maven Helper

insert image description here

Step2: Go to the pom file, you will find this "dependency Analyzer" label

insert image description here

Step3: Click conflicts, all packages with conflicting versions will be on the left, and on the right is the specific conflict information after clicking the package name

insert image description here

Step4: Right-click conflicting package names can be deleted directly, which is more convenient than idea to manually add

insert image description here

Step5: After modification, click reimport to reload the package

insert image description here

End Thanks for reading~

Guess you like

Origin blog.csdn.net/ptyp222/article/details/128002942