runtime is useful for dependencies needed for unit tests and at runtime, but not at compile time. This can usually be dynamically loaded code, such as JDBC drivers, which are not directly referenced by the program code.
Establishing a dependency on runtime ensures that there is no random code dependency, and also delays the dependence on transitivity. So, for example, if module A has a runtime dependency on library X, and module B depends on module A, it does not inherit dependency on library X. Using "provided" or "compilation" will cause B to depend on X .
John Stauffer Sep 05 2018-12-12T00: 00Z
source share