X

Geertjan's Blog

  • January 10, 2014

Free Graphs to Manage Maven Complexities

Geertjan Wielenga
Product Manager

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.

Join the discussion

Comments ( 8 )
  • Sean Phillips Friday, January 10, 2014

    Geertjan,

    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.

    Sean


  • alex Friday, January 10, 2014

    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.


  • Geertjan Friday, January 10, 2014

    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 netbeans.org 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! :-)


  • alex Saturday, January 11, 2014

    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.


  • Jimbo Monday, January 13, 2014

    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.


  • Geertjan Monday, January 13, 2014

    Everything in the Maven graph view is Visual Library widgets.


  • jmborer Tuesday, January 14, 2014

    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.


  • markiewb Tuesday, January 14, 2014

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

    See http://timboudreau.com/blog/NetBeans_Visual_Library_Meets_JUNG/read


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.