Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven:how to check which jars are not being used at all

We have a multiwar project and with various people working on the project a lot of times, lots of unused jars are still specified as dependencies, is there any way , to check which jars are not used at all, but nonetheless, are being referred to as a dependency?

I hope maven already has support for something like this, considering its such a powerful tool.

like image 255
Neeraj Avatar asked Jan 19 '23 06:01

Neeraj


1 Answers

Run mvn dependency:analyze. It should do the work.

like image 122
AlexR Avatar answered Jan 20 '23 20:01

AlexR