Visualizing Spring Dependencies

Over the last couple of months, I have been playing with Kotlin in my spare time. To get a better feel for the language, I decided to implement a small program that reads through a POM file and diagrams all of its dependencies using Graphviz and dot.

With the exception of one, the dependencies in the images below only include Spring dependencies (com.springframework.*, io.spring.*). The “unfiltered” example below is included only to show what this looks like. This has helped me better visualize how the various projects reference each other. For example, these diagrams changed how I thought the Spring IO Platform was used. Instead of having projects like Spring Boot align with a specific version of the Spring IO Platform, you can see from the diagram below that Spring Boot drives the Spring IO Platform.

As you can imagine, I now have a whole new appreciation for the shenanigans that maven/gradle need to go through to derive dependencies.

Note: Click the images below for a larger version.

Legend:

Fill Color

Green - This node is where the graph starts

Orange - This is a regular Project Object Model (POM) file

Blue - This is a Bill of Materials (BOM) file

Arrows

Solid Line, Open Arrow - This arrow points to a given POM files parent