SpringOne 2GX 2011

Chicago, October 25-28, 2011

Viewing Dependencies in Grails

Posted by: Burt Beckwith on 2011-03-05 14:48:00.0

Update: This work with Griffon too (via @aalmiray)

Grails uses Ivy for dependency management, and when things seem weird you can use the dependency-report command to generate some information to help figure things out.

By default it generates reports in target/dependency-report and it creates one report for each of the configurations (build, compile, provided, runtime, and test). It’s simple to do – just run

grails dependency-report

and open any of the generated html files in a browser. Click the tabs to navigate to the others:

There are other files generated though, and I’d always ignored them since usually the html reports have everything I need. For each html report there’s a corresponding .graphml file and today I was curious what the graphs looked like.

It looks like yEd Graph Editor is a popular viewer. It’s free and can either be downloaded or run from their web site using Web Start.

Unfortunately the initial view is completely useless:

But there are instructions in the Ivy docs for changing the graph layout. After making the changes you get a large graph:

and you can zoom in and out to view the details:

flattr this!


About Burt Beckwith

Burt Beckwith

Burt Beckwith is a Java and Groovy developer with over ten years of experience in a variety of industries including biotech, travel, e-learning, social networking, and financial services. For the past three years he's been working with Grails and Groovy full-time. Along the way he's created over fifteen Grails plugins and made significant contributions to several others. He was the technical editor for Grails in Action.

More About Burt »

NFJS, the Magazine

2011-09-01 00:00:00.0 Issue Now Available
  • Build Your Own Technology Radar

    by Neal Ford
  • Programming with Scala Traits, Part Two

    by Venkat Subramaniam
  • MVC Meet Javascript, Javascript Meet MVC

    by Brian Sam-Bodden
  • The Art of Groovy Command Expressions in DSLs

    by Hamlet D`Arcy
Learn More »