I have a standalone maven project, let's call it foo-lib.jar
, which depends on slf4j-api.jar
- Another project
bar-app.jar
depends onfoo-lib.jar
- a bunch of other libraries
slf4j-api.jar
- the log4j backend for SLF4j
- The
foo-lib.jar
project can be built and run standalone, and it includes an additional runtime dependencyslf4j-jdk14.jar
My question is: how can I declare this runtime dependency for slf4j-jdk14.jar
without forcing it on the bar-app.jar
project? (which maven scope should I use)
(It's also hard for me to test the effect of this on bar-app.jar
; the bar-app.jar
project is complicated and for some reason it doesn't build on my machine, so instead I work with that project's maintainers.)
I've read these other SO questions but it is still confusing for me.