How to view dependencies in IDEA

Maven provides mvn dependency:tree to view dependencies, and IDE often provides a more convenient way, such as Eclipse or IDEA has similar functions, this article briefly explains how to view dependencies in IDEA.

Operation 1: Open the Maven Project view

Click on the Maven Project view, if it is not already open, use the View menu to open it.
insert image description here

Operation 2: Display the dependency graph

Select the corresponding project, select it in the right-click menu
insert image description here
, and then you can see the overall dependency diagram
insert image description here

Operation 3: View

Click the 1:1 button, and then you can view it normally.
insert image description here
After Ctrl + F, you can enter the relevant package name, and then you can view its detailed information. For example , check
insert image description here
the usage association of an old version of quartz here.
insert image description here
Highlighted because sometimes it's just too hard to see
insert image description here

Operation 4: exclude

You can also exclude conflicting dependencies as needed (generally red solid lines indicate conflicts, and red dotted lines indicate multiple references), etc. Note that the operations here will actually modify the pom.xml file, so be sure to back it up beforehand.
insert image description here

Operation 5: Save to local view

Hang the Export to file menu item
insert image description here
and enter the file name and save address.


Summarize

IDEA provides a way to view dependencies, but the current IDE is not very convenient to use, and it can only be a simple assistance, which is too troublesome to drag and view.

Guess you like

Origin blog.csdn.net/qq_43842093/article/details/131606056