Maven Dependencies Diagram

Anyone working on large Maven projects knows well about how hard it is to keep in mind all the dependencies between modules and libraries; and even harder, to resolve conflicts between them. We’ve greatly improved Maven Dependencies Diagram to make this whole thing a lot simpler.

There are several approaches to resolving dependency conflicts, and so we created a special layout that shows you dependencies (nodes) in the exact order as they are defined in pom.xml files. This differs from other Maven dependency diagrams: for example, in Eclipse this diagram looks like this:

It’s hard to understand and impossible to navigate from node to node by keyboard. All artifacts with different version numbers are merged (multiple incoming links per node), and there are no visible conflicts. IntelliJ IDEA shows you dependency layout exactly in the order they are defined in pom.xml

It’s easy to find your modules on diagram — they all are blue, as well as test dependencies are green. Conflicting dependencies are marked red, and you can find what they conflicted with by selecting one of them:

You can fix a conflict by excluding a dependency. IntelliJ IDEA will offer all places where it’s possible to add the exclusion definition:

Navigation from nodes to POM files is also convenient. Each dependency links directly to the place where it was defined:

On huge dependency diagrams it is useful to use scope filter to decrease number of nodes:

Maven Dependencies Diagram will be available in the first EAP of IntelliJ IDEA 10. Your suggestions and feature requests are welcome.

Comments below can no longer be edited.

34 Responses to Maven Dependencies Diagram

  1. Avatar

    Paul says:

    May 31, 2010

    Does it support Ivy dependencies too?

  2. Avatar

    wax says:

    May 31, 2010

    That’s awesome. Can’t wait to see it in action.

  3. Avatar

    Ashitkin Alexander says:

    May 31, 2010

    Amazing. this is really cool. as i see dependencies coloured in a different way. is it because of a different scope?

  4. Avatar

    Simon Knott says:

    May 31, 2010

    Looks a great improvement!

    Is it possible to print the dependency diagrams yet? That would help massively when trying to sort out multi-module dependency conflicts.

  5. Avatar

    Simon Knott says:

    May 31, 2010

    As for a feature request, I’d still love to be able to get a reverse-dependency graph for Maven-imported libraries if that’s possible. i.e. Select a library which has been imported by Maven and then see exactly how that’s pulled in across the project.

  6. Avatar

    Stefan A. says:

    May 31, 2010

    +1, that’s cool stuff. Would really love to this for Grails dependencies too! Since Grails uses Ivy under the hood, that should not be a big issue.

  7. Avatar

    B. K. Oxley (binkley) says:

    May 31, 2010

    Faster, please.

    IDEA 8 was excellent, big step over 7. IDEA 9 was even better, big step over 8. With improvements like these, IDEA 10 looks to be amazing.

  8. Avatar

    Frustrated says:

    May 31, 2010

    Useless article. Wonderfull pics. Could you try again start at the beginning of the story (instead of the middle) and tell us how to get the maven dependancy diagram

  9. Avatar

    Konstantin Bulenkov says:

    June 1, 2010

    2Alexander: yes, it is so. Project modules are colored in blue, test scope in green (as usual).
    Also, there are few features I forgot to mention about.
    + You can detect duplicates: http://i50.tinypic.com/r2j9f4.png
    + You can use standard Ctrl+F12 to see all nodes in popup and navigate quickly. Very useful on huge diagrams

  10. Avatar

    Bala says:

    June 1, 2010

    In Eclipse plugin screenshot, in case of conflicts (same dependency from multiple sources), in a single glance I can see the final version of the dependency that will be used. Is there anyway we can achieve that here also?

  11. Avatar

    Kris Schneider says:

    June 1, 2010

    Very nice. Any chance that this will also support Ivy? If not, it would be helpful if the feature were implemented in such a way as to make it (relatively) easy to come up with a plugin for Ivy support.

  12. Avatar

    Dirk Dittert says:

    June 2, 2010

    There’s only one word for that: awesome!

  13. Avatar

    John Hurst says:

    June 2, 2010

    This is great, but we use (Ant+)Ivy.

    Any chance of Ivy support for this? Any chance of 1st-class Ivy support in IDEA (rather than a 3rd party plugin)?

    John Hurst

  14. Avatar

    Erik Pragt says:

    June 2, 2010

    This feature looks pretty cool indeed! I hope this also means, since it’s related to project dependencies, that the module dependencies come back in the project, instead of only the ‘project dependencies’ (while in my case, there’s no such thing as ‘project dependencies’. All modules have dependencies, not the “project”!)


  15. Avatar

    Konstantin Bulenkov says:

    June 4, 2010

    2Simon Knott: Sure, here Print action is selected http://i48.tinypic.com/2l8uefs.png
    Also, it’s possible to save diagram to gif, png, jpg to use in documentation.

  16. Avatar

    Konstantin Bulenkov says:

    June 7, 2010

    Ivy is not IntelliJ IDEA’s bundled plugin. But if we decide to bundle it or write our own support for Ivy, diagrams will be there with no doubt. Anyway, authors of Ivy plugin can contact me and I can tell them about UML-API in intelliJ IDEA to create such diagrams in one day.

  17. Avatar

    Jens Nerup says:

    June 9, 2010

    Konstantin Bulenkov, I’ll be interested in knowing more about the UMP-API to create such a diagram for Ivy.

  18. Avatar

    Konstantin Bulenkov says:

    June 15, 2010

    @Jens Nerup: I’ve sent you details about UML-API by e-mail.

  19. Avatar

    Constantine Plotnikov says:

    June 17, 2010

    Ivy support is planned for IDEA 10. However it is not yet clear if the first version of the support will include diagrams. The priority is automatic management of libraries provided through ivy and support for resolving artifacts.

  20. Avatar

    Oleh says:

    July 1, 2010

    Will it be available in IDEA Community Edition?

  21. Avatar

    Konstantin Bulenkov says:

    July 8, 2010

    @Oleh Unfortunately it won’t. We can’t use the diagramming library in free version of IntelliJ.

  22. Avatar

    Timothy Lee says:

    July 29, 2010

    Would this work with parent-pom’s too though?
    For example, if the parent pom defines the versions of dependencies using dependencyManagement, and my project’s pom only refers to the groupId and artifactId without the version, would it still produce the maven diagram?

  23. Avatar

    Konstantin Bulenkov says:

    August 6, 2010

    @Timothy, try out IntelliJ IDEA X EAP: http://confluence.jetbrains.net/display/IDEADEV/IDEA+X+EAP
    And, of course, you’re welcome to post bugs/feature_requests against IDEA 10 here: http://youtrack.jetbrains.net

  24. Avatar

    Arseny Sizov says:

    December 17, 2010

    Could you please include ivy support of any kind in IDEA 10. Currently it block us from moving from IDEA 9.

  25. Avatar

    yole says:

    December 19, 2010

    Unfortunately we don’t plan to include an official Ivy plugin in IntelliJ IDEA 10 (which has already been released, and thus feature-complete). You can contact the developers of existing third-party Ivy plugins and ask them to update the plugins for IDEA 10 compatibility.

  26. Avatar

    Bob says:

    January 4, 2011

    I have a IntelliJIDEA 10 Ultimate trial version. How do I bring up the dependency editor?


  27. Avatar

    Konstantin Bulenkov says:

    January 19, 2011

    Hello Bob!
    The dependency editor? To edit pom files? You can navigate from node to corresponding place in pom file by pressing F4 on a diagram.

  28. Avatar

    Rob Juurlink says:

    May 26, 2011

    Works great! But how to zoom the diagram?

    My Maven project generates a huge diagram. To fit in the window, the diagram is scaled down, but now the text is so small I cannot read the version numbers. How the enlarge?

  29. Avatar

    Konstantin Bulenkov says:

    May 27, 2011

    Use Alt+Mouse or Ctrl+MouseWheel to zoom. Also, Ctrl+F12 works fine for navigation

  30. Avatar

    Guillaume says:

    June 16, 2011

    Any way I can find the usage of a given maven module in my project by other modules in that same project ?

    I tried find usage on the pom.xml but it does not find other pom.xml referencing it.

    Did I miss something?

  31. Avatar

    Suresh says:

    July 19, 2012

    Is there a way to hide dependencies in the graph , I don’t want to exclude them just want to reduce the noise and filter some artifacts that I don’t want to see

  32. Avatar

    faker says:

    May 30, 2018

    I can`t use TreeLayout Diagram

    • Avatar

      jksong says:

      November 4, 2018

      me too, how can i resolve it?

  33. Avatar

    huang kunlun says:

    July 4, 2019

    i update IDEA to version 2019.1,but the search function ctr+F can‘t work,ie i can not searh in maven dependency diagrams view。is 2019 version not support search function?

Discover more