1

I inherited a large codebase built with maven multi modules. I want to explicitly reference dependencies used in the source code itself, categorize by compile/test and delete dependencies that are not used at test/runtime.

Is there a tool/plugin that does this for me or do I need to write it myself?

Alex
  • 8,518
  • 4
  • 28
  • 40

1 Answers1

1

The dependency plugin offers mvn dependency:analyze which allows you to find out which dependencies are actually used in your source code. It furthermore tells you if you use transitive dependencies directly in your source code.

I do not know whether you can do something like that for test code as well.

J Fabian Meier
  • 33,516
  • 10
  • 64
  • 142