Free Graphs to Manage Maven Complexities

Let's admit it, Maven can be a total nightmare. 

The only real way to get a thorough understanding of what's really going on in that Kafkaesque POM file is to draw a picture. Better still, a dependency graph. And NetBeans IDE has done that for you for sometime already, though an excellent enhancement in the upcoming NetBeans IDE 8.0 release is that you can change the layout of the graph. See below, just right-click the graph and then choose a different layout:

Notice also that you can "Export As Image" (and then send to your manager to prove how complex your work really is). And below you see the hierarchical layout, vertical layout, and horizontal layout: 

Don't you feel calmer and more organized (and smarter), just by LOOKING at the graphs above..? 

However, the point isn't only to INTERPRET the world in various ways, but to CHANGE it. Easily done, just right-click one of those blocks and you can choose to exclude it: 

Doing the above doesn't just change the PICTURE, i.e., doesn't simply make it easier to understand what you're SEEING, but it actually CHANGES the POM, as you can see in the History tab below, which is of course also awesome to have integrated right inside your POM file, with the possibility of reverting local changes: 

And then I didn't even mention the Effective POM tab, which has been there for a while, but is awesome too.

Finally, the plugin you need to install to get the above functionality is... nothing! Because the above, as with all Maven features in NetBeans IDE, is simply built into the IDE and is available the second you've started it up. 

NetBeans IDE manages the complexity that Maven inherently brings with it. And all for free. And out of the box.



It is not often that I actually say "Wow" out loud when reading a software development article, but I did that when I read the part of changing the POM using the dependency graph. This is one example of visual configuration/programming that has always been a bit of a holy grail for programmers. A truly awesome feature.

If this is the direction and roadmap that NetBeans is taking then I am very reassured for the future.


Posted by Sean Phillips on January 10, 2014 at 05:16 AM PST #

Quite honestly, Maven has had the ability to output both the effective POM and a dependency tree for as long as I remember. Granted, it was CLI only (tools to turn those into prettier graphics have been around for a while, too), but never have I felt the POM was anything "Kafkaesque". You want "Kafkaesque", you open a build.xml instead :D
That aside, having the ability to explore the POM built into the IDE is a great addition. I don't have Netbeans handy, is there a possibility to filter (e.g. by package)? Because w/o that, I imagine the "effective POM" part will be quite busy.

Posted by alex on January 10, 2014 at 08:01 AM PST #

Sean, great to hear, I said "Wow", too, when I first saw it. Alex, quite honestly, the fact that Maven can do something from CLI only is exactly the point why IDEs, such as NetBeans, are needed: graphs need to be visual, and configurable, otherwise what's the point of graphs. And, if you don't have NetBeans IDE "handy", it's as easy as downloading it from and checking it out for yourself to see if it meets your needs. Let me know if I can help further, but really, put in a tiny bit of effort and you'll be able to answer your questions yourself! :-)

Posted by Geertjan on January 10, 2014 at 02:34 PM PST #

Thanks. I was @work when I posted, I have all 3 major Java IDEs installed @home. I even keep a copy of Netbeans 6.5.1 around since that's the last version that had a UML plugin. ;-) What I don't use anymore is NB pre-releases, because they won't update to the final version.

Posted by alex on January 11, 2014 at 03:54 AM PST #

Yes, wow. As an extensive user of Maven and Netbeans, this feature is great. I am just wondering if they used JUNG for the layout. This project might help a lot when used with the visual library.

Posted by Jimbo on January 13, 2014 at 02:07 AM PST #

Everything in the Maven graph view is Visual Library widgets.

Posted by Geertjan on January 13, 2014 at 02:12 AM PST #

I was not clear: I meant the use of JUNG not for the painting, but just for the layout algorithms. Layout of graphs, whatever visual library you use, is a difficult task and libs like JUNG are of great help.

Posted by jmborer on January 14, 2014 at 02:24 AM PST #

@jmborer: Tim Boudreau already combined JUNG with VL. But has not been integrated into NetBeans (yet).


Posted by markiewb on January 14, 2014 at 02:36 PM PST #

Post a Comment:
  • HTML Syntax: NOT allowed

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.


« July 2016