Assuming I have a dependency relationship of "my-project -> my-library ->
upstream-library", with each dependency in compile scope, I know that
my-project transitively picks up a compile scope dependency on
upstream-library. Reading the documentation at
https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
I see a note about this transitive dependency:

"(*) Note: it is intended that this should be runtime scope instead, so
that all compile dependencies must be explicitly listed - however, there is
the case where the library you depend on extends a class from another
library, forcing you to have available at compile time. For this reason,
compile time dependencies remain as compile scope even when they are
transitive."

If I know that my-library does not have this issue, is there any way to
declare the dependencies such that I can get the intended behavior? I want
upstream-library to be picked up as runtime scope for my-project, not as
compile scope.

Thanks,
--
Andy Feldman

Reply via email to