Across all of the libs and apps in a microservice architecture there is a dependency tree lurking. Some are more obvious dependencies (like model and common), but others are more subtle due to client API and DTOs.
With the bundle (all apps in one repo) workspace open in IntelliJ, it is possible to generate a diagram that shows the dependencies and arranges them in a convenient hierarchical view. The hierarchical view works well for driving merge/build order of the dependencies.
First, right-click on one of the module directories of interest and select "Diagrams > Show Diagram..."
Then, select "Project Modules":
Before going further, change the layout to "Hierarchic Group Layout" by right clicking anywhere in the whitespace area of the diagram and selecting that layout type from the "Layout" submenu:
With that layout, the deepest dependencies are in the top row, next deepest in the second row, and so on. When merging/building changes that span several modules, work through the merges/builds in row-order.
When the diagram is first generated, it will include the project-level dependencies of the initial module. You can always have the diagram compute more module dependencies by pressing the space key and starting to type the desired module name to add.
To share the diagram as a PNG, you can use the "Export to Image File" action in the toolbar:
Across all of the libs and apps in a microservice architecture there is a dependency tree lurking. Some are more obvious dependencies (like model and common), but others are more subtle due to client API and DTOs.
With the bundle (all apps in one repo) workspace open in IntelliJ, it is possible to generate a diagram that shows the dependencies and arranges them in a convenient hierarchical view. The hierarchical view works well for driving merge/build order of the dependencies.
First, right-click on one of the module directories of interest and select "Diagrams > Show Diagram..."
Then, select "Project Modules":
Before going further, change the layout to "Hierarchic Group Layout" by right clicking anywhere in the whitespace area of the diagram and selecting that layout type from the "Layout" submenu:
With that layout, the deepest dependencies are in the top row, next deepest in the second row, and so on. When merging/building changes that span several modules, work through the merges/builds in row-order.
When the diagram is first generated, it will include the project-level dependencies of the initial module. You can always have the diagram compute more module dependencies by pressing the space key and starting to type the desired module name to add.
To share the diagram as a PNG, you can use the "Export to Image File" action in the toolbar: