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
There is no concept of test-runtime in maven. The only real downside is the dependency analysis identifying these runtime test dependencies as unused. Since they are only test dependencies, however, this is pretty benign and cannot cause issues to other projects transitively dependent on this project.