Is there a simple way to remove unused dependencies from a maven pom.xml?

Viewed 206588

I have a large Maven project with many modules and many pom.xml files. The project has changed and I suspect the pom's contain some unnecessary dependencies. Is there is a command which removes any unused dependencies from a pom?

7 Answers

If you are using eclipse, right-click on the jar in Maven Dependencies: Select Maven -> Exclude Maven Artifact...

Related