Skip to content

MODULE.bazel doesn't define @maven repository #17176

Closed
@comius

Description

What version of protobuf and what language are you using?

Version: 27.1 (and at head)
Language: Bazel 7+ with bzlmod enabled

What did you do?

Steps to reproduce the behavior:

$ bazel --version
bazel 7.2.0
$ touch WORKSPACE.bzlmod   # disables WORKSPACE file for bzlmod
$ bazel build --enable_bzlmod //java/util

What did you expect to see
Successful build.

What did you see instead?

ERROR: no such package '@@[unknown repo 'maven' requested from @@]//': The repository '@@[unknown repo 'maven' requested from @@]' could not be resolved: No repository visible as '@maven' from main repository
ERROR: /usr/local/google/home/ilist/src/protobuf/java/util/BUILD.bazel:8:13: no such package '@@[unknown repo 'maven' requested from @@]//': The repository '@@[unknown repo 'maven' requested from @@]' could not be resolved: No repository visible as '@maven' from main repository and referenced by '//java/util:util'
ERROR: Analysis of target '//java/util:util' failed; build aborted: Analysis failed
INFO: Elapsed time: 0.359s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
ERROR: Build did NOT complete successfully

Anything else we should know about your project / environment

This problem practically prevents protobuf to be used as a transitive dependency with bzlmod.

Activity

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

Metadata

Assignees

No one assigned

    Labels

    untriagedauto added to all issues by default when created.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions