Rename maven install back to in MODULE.bazel#22545
Merged
copybara-service[bot] merged 1 commit intomainfrom Jul 11, 2025
Merged
Rename maven install back to in MODULE.bazel#22545copybara-service[bot] merged 1 commit intomainfrom
copybara-service[bot] merged 1 commit intomainfrom
Conversation
a4c51d8 to
f39369a
Compare
Fixes #21177 This PR essentially reverts #18641, which claimed > Since protobuf is not contributing to user's JARs This is not true since targets like `@com_google_protobuf//:protobuf_java` are meant to be consumed by other projects, therefore protobuf should not use a private maven install namespace. Otherwise, it leads to duplicated maven jars and classpath conflicts. See #21177 and bazel-contrib/rules_jvm_external#916 (comment) The original warning message caused by multiple modules contributing to `maven` can be suppressed with bazel-contrib/rules_jvm_external#1393, which will be available in rules_jvm_external 6.8. Closes #22544 PiperOrigin-RevId: 782032198
f39369a to
1999135
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rename maven install back to in MODULE.bazel
Fixes #21177
This PR essentially reverts #18641, which claimed
This is not true since targets like
@com_google_protobuf//:protobuf_javaare meant to be consumed by other projects, therefore protobuf should not use a private maven install namespace. Otherwise, it leads to duplicated maven jars and classpath conflicts. See #21177 and bazel-contrib/rules_jvm_external#916 (comment)The original warning message caused by multiple modules contributing to
mavencan be suppressed with bazel-contrib/rules_jvm_external#1393, which will be available in rules_jvm_external 6.8.The PR use a repo mapping trick of
use_repoto keep BUILD files intact, underlying bothprotobuf_mavenandprotobuf_maven_devpoints to the universalmaveninstall, while targets inprotobuf_maven_devare only available while protobuf is the root module and won't propagate to dependents.