I commonly find myself in the situation where a dependency needed in a top level module is available because one of the modules it depends on has the same dependency.
For example:
my-module
+- spring-core
\- commons-logging
So assuming I am happy with the version of the transitive dependency, should the depdency, in this case on commmons-logging, be redeclared as follows:
my-module
+- spring-core
| \- commons-logging
\- commons logging
Or should I just accept the dependency will be obtained transitively?
IMO it is better to declare it explicitly, so that you can have control over the exact version you use. Otherwise the actual version used can silently change whenever another dependency is updated or a new, seemingly unrelated dependency is introduced, which transitively depends on a newer version of the other library.