Rename maven to protobuf_maven in MODULE.bazel (#18641)
The default name for the rules_jvm_external.maven rule is "maven". When not set, it defaults to "maven". For root modules also using rules_jvm_external, the name clash causes a warning: ``` DEBUG: $TMP/external/rules_jvm_external~/private/extensions/maven.bzl:154:14: The maven repository 'maven' is used in two different bazel modules, originally in '<my_workspace>' and now in 'protobuf' ``` Summarizing @shs96c in [1]: > The common maven repo name allows rulesets to contribute to the user's JARs. > However, this implies that maven is for the end user, not for transitive > dependencies. If a ruleset needs private dependencies, it should use a custom > namespace rather than the maven namespace. Since protobuf is not contributing to user's JARs, we'll use a custom namespace. There's precedent for using a custom namespace for library modules: - rules_jvm_external uses `rules_jvm_external_deps` instead of `maven`. - rules_kotlin uses `kotlin_rules_maven` instead of `maven`. [1]: https://github.com/bazel-contrib/rules_jvm_external/issues/916#issuecomment-1645527584 Fixes #16839. Closes #18641 COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/18641 from jschaf:joe/protobuf-maven bd2c62f3118264adc1e725102d1ecc576f145f35 PiperOrigin-RevId: 684625084
J
Joe Schafer committed
44660b306aa17a0bbc346cc14d5da20f05167ac9
Parent: 25724ab
Committed by Copybara-Service <copybara-worker@google.com>
on 10/11/2024, 12:02:43 AM