I have a dependency that I want to use in test
scope (so that it is in the classpath when I am running unit tests), and in runtime
scope (so that I can
Declaring a dependency with a scope of runtime
ensures that the library is not available during compile time.
Declaring the dependency as optional causes a break in the dependency resolution process; projects depending on your libraries will need to explicitly include the dependencies themselves.
So the correct way to declare this would be:
org.slf4j
jcl-over-slf4j
1.7.13
runtime
true