Skip to content

Rename maven install back to maven in MODULE.bazel#22544

Closed
meteorcloudy wants to merge 5 commits intoprotocolbuffers:mainfrom
meteorcloudy:maven_namespace
Closed

Rename maven install back to maven in MODULE.bazel#22544
meteorcloudy wants to merge 5 commits intoprotocolbuffers:mainfrom
meteorcloudy:maven_namespace

Conversation

@meteorcloudy
Copy link
Copy Markdown
Contributor

@meteorcloudy meteorcloudy commented Jul 9, 2025

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.

@meteorcloudy
Copy link
Copy Markdown
Contributor Author

/cc @zhangskz @jschaf @shs96c @Wyverald

@meteorcloudy meteorcloudy requested a review from a team as a code owner July 9, 2025 14:15
@meteorcloudy meteorcloudy requested review from googleberg and removed request for a team July 9, 2025 14:15
@meteorcloudy meteorcloudy requested a review from a team as a code owner July 9, 2025 14:27
@meteorcloudy meteorcloudy requested review from Logofile and removed request for a team July 9, 2025 14:27
@meteorcloudy meteorcloudy changed the title Rename maven install back to in MODULE.bazel Rename maven install back to maven in MODULE.bazel Jul 9, 2025
@Logofile Logofile removed their request for review July 9, 2025 14:53
@meteorcloudy
Copy link
Copy Markdown
Contributor Author

This change is implemented internally at cl/781031722

@jschaf
Copy link
Copy Markdown
Contributor

jschaf commented Jul 9, 2025

This is not true since targets like @com_google_protobuf//:protobuf_java are meant to be consumed by other projects

That target is aliased to //java/core which is plain java_library.

I figured the change was safe since it only impacted test-only targets: https://github.com/protocolbuffers/protobuf/pull/18641/files

That said, I don't use Java directly—my only goal was to silence the warning. Since that's now possible, I no longer have skin in the game.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clarification on protobuf_maven namespace change and transitive dependency resolution

2 participants