Declare Maven dependency as test runtime only

前端 未结 4 1197
半阙折子戏
半阙折子戏 2021-02-04 00:03

What is the best way to declare a Maven dependency as only being used for the test runtime (but not test compilation) class path?

Specifically, I want slf4j-api

4条回答
  •  伪装坚强ぢ
    2021-02-04 00:28

    Since maven-dependency-plugin 2.10 (revision 1649454, Jan 2015), you can also add to the configuration a list of ignoredDependencies, ignoredUnusedDeclaredDependencies and ignoredUsedUndeclaredDependencies.

提交回复
热议问题