IntelliJ IDEA makes it possible to view Maven dependencies as a UML class diagram. In this diagram, you can discern:
- Your own modules (blue )
- Test dependencies (green)
- Conflicting or unsatisfied dependencies (red)
In the Maven Dependencies diagram, you can:
- Navigate from a node to the corresponding source code.
- Mark dependencies as excluded.
- Filter out the nodes on diagram, when the diagram is too large.
- Do one of the following:
- In the Maven Projects tool window, right-click the desired
pom.xmlfile, and choose , or . - Right-click
pom.xmlin the editor, and choose . - Press ⌥⇧⌘U or ⌥⇧⌘U⌥⇧⌘U or ⌥⇧⌘U⌥⇧⌘U or ⌥⇧⌘U^ ⇧ ⌥ U, ⌃⌥⇧U or ⌃⌥⇧U^ ⇧ ⌥ U, ⌃⌥⇧U or ⌃⌥⇧U or ⌥⌘U or ⌥⌘U⌥⌘U or ⌥⌘U⌥⌘U or ⌥⌘U^ ⌥ U, ⌃⌥U or ⌃⌥U^ ⌥ U, ⌃⌥U or ⌃⌥U.
- In the Maven Projects tool window, right-click the desired
- Select the desired node, and press ⌘↓, F4, ⌘↓ or F4F4 or F4F3 or F3F4, F4 or F4F4, F4 or F4, or choose on its context menu. The corresponding file opens in the editor.
- Select a dependency in diagram.
- On the context menu, choose .
- From the drop-down list, select the module where exclusion definition will be added. The selected dependencies will be removed from diagram, and
exclusionsection will be added to the corresponding dependency.
You can undo this operation by pressing ⌘Z or ⌘Z⌘Z or ⌘Z⌘Z or ⌘Z^ Z, ⌃Z or ⌃Z^ ⇧ Minus, ^ Slash, ⌃⇧-, ⌃/, ⌃⇧- or ⌃/.
- On the diagram toolbar, click
. - From the drop-down list, select the desired scope.