Peter Štibraný
Peter Štibraný

Reputation: 32893

Removing unused libraries without breaking the code

Over the years, our project has used many different libraries. I'm pretty sure some of them are not used anymore, while others are obsolete and should be upgraded.

I am looking for tool to find which libraries (jar files) are no longer used and can be removed. I could also use some help to find out which libraries should be upgraded -- at least when I swap jar file with newer version, I would like to get report saying that there are now incompatibilities (wrong method signatures, unknown classes, ...).

Is there tool like that?

We don't use Maven or Ivy or any other dependency management system. We have tests, but they don't cover everything.

Upvotes: 4

Views: 534

Answers (2)

sagschni
sagschni

Reputation: 89

I don't know which IDE you use. But you can use the plugins UCDetector or Classpath Helper.

Upvotes: 0

renke
renke

Reputation: 1230

I recomend you take a look at ProGuard. You can configure it to remove unused jars, or even, if you want to go deeper, remove unused parts of libraries.

Upvotes: 1

Related Questions