Find modules that depend on your library.
It is painful to make a change on an internal library since anticipating the impact of the change is not that easy always. So, having a list of dependent modules/services might be useful.
- Node.js 8+
Firstly, generate a dot file formatted dependency tree using
Maven Dependency Plugin. Setting
appendOutput parameter to
critical if you have multiple repositories.
For instance, you can use the following command to find dependencies with
mvn dependency:tree -Dincludes="org.springframework:*" \ -DoutputType=dot \ -DappendOutput=true \ -DoutputFile=/tmp/mvn-dependents-workspace/output.dot
PROTIP: Refer dependency:tree documentation.
PROTIP: You can change and use create-dot-file.sh if you have multiple repositories.
whitelist.json file with your artifacts under
to eliminate unnecessary dependencies. In our case, let's add only
spring-context because we do not care about other modules.
[ "spring-core", "spring-context" ]
Then, transform the dot file to a json file that can be rendered by user interface using the following node script:
npm install # if you have not run before node scripts/transfrom-dot-file-to-json
Finally, start the web application.
npm install # if you have not run before npm start
npm buildand serve static files under
buildfolder using something like http-server.
Then, open http://localhost:3000/ to see dependents.
PROTIP: See update-data.sh to create an all-in-one script.
- ant-design for the searchable tree component
- react-debounce-input useful when working with a large data set
- dotparser a dot file parser for node.js