My library supports Bazel builds and has a dependency from Maven Central. A user of my library wants to use a newer version of a dependency that has new transitive dependencies. How can that be done?
gRPC 1.17 depends on Guava 26. However, Guava 27 added a dependency on com.google.guava:failureaccess. Normally an application using gRPC would just make their own native.maven_jar() with the new version and disable gRPC's call to native.maven_jar(). This would then "upgrade" the @com_google_guava_guava repository that is then consumed by both gRPC and the application.
But @com_google_guava_guava does not include dependency information. That is commonly solved by having third_party java_library()s that stitch the transitive dependencies together. However, those java_library()s can't be changed by the application.
I believe that bind() would solve this problem, as gRPC could depend on //external:com_google_guava_guava which could be a java_library(). But bind() is discouraged.