Find dependant (reverse dependencies) in maven project
Although outdated since the question is from 2014, I was looking for something similar:
matching dependencies (f.e. junit
) to a list of projects (f.e. maven-compiler-plugin 3.6.0
) in use, which should give a list of dependent dependencies currently in use (f.e. junit 4.12
). That should point us (for our own projects) to outdated dependencies (f.e. junit 3.8
). This will be used for the undeployment of overgrown services (in this case).
Since I was unable to find an automated version (other than manual nexus/repo-plugins or maven-dependency-greps), I wrote a small java tool: reverseDependencies. Feel free to use if you come across a similar task. Note: it will check against the online Nexus-like repository or cache file that you specify.
Try this:
mvn dependency:tree -Dincludes=module
Where module
is the dependency you're interested in. You should get the list of libraries that depend on the module you've specified, either directly or transitively.