Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to detect unused maven dependencies [duplicate]

Tags:

I have a maven project that was generated by Spring Roo. Now I am not sure whether I need all of its dependencies.

Is there a tool to automate the process of detecting stale dependencies?

like image 995
er4z0r Avatar asked Mar 14 '10 20:03

er4z0r


People also ask

How do I delete duplicate dependencies in Maven?

Use the <exclusions> tag into <dependency> tag of the pom to exclude that duplicate dependencies from maven project. Show activity on this post. Run mvn clean It will tell you your duplicate dependencies. Then delete them.

How do I remove duplicate dependencies?

Removing Duplicate Dependencies Once we have identified our duplicate dependencies, the simplest way to remove them is to delete them from pom. xml and keep only those unique dependencies that are used by our project.

Does Maven clean remove dependencies?

It only cleans the project. Show activity on this post. Show activity on this post. With the help of Purging local repository dependencies you need to do that.


1 Answers

The Maven Dependency plugin should be able to help, especially the analyze options.

like image 65
davek Avatar answered Sep 19 '22 01:09

davek