What are unused/undeclared dependencies in Maven? What to do with them?

前端 未结 2 1635
庸人自扰
庸人自扰 2020-12-12 15:04

Maven dependency:analyze complains about the dependencies in my project. How does it determine which are unused and which are undeclared? What should I do about

2条回答
  •  情深已故
    2020-12-12 15:33

    The answer to:

    "How does it determine which are unused and which are undeclared?".

    Maven uses Object WebASM framework that analyzes your raw bytecode. It goes through all your classes and then builds a list of all classes that these reference. That is the how.

    As to what to do, I would not recommend removing the "unused, declared dependecies" unless you are absolutely sure they actually unused.

提交回复
热议问题