Ask questionsBazel build failed to fetch Maven dependency
When I run bazel build -c opt --config=android_arm64 mediapipe/examples/android/src/java/com/google/mediapipe/apps/handtrackinggpu, I met with following error:
DEBUG: Rule 'build_bazel_rules_apple' indicated that a canonical reproducible form can be obtained by modifying arguments commit = "6c9fcae7a3597aabd43f28be89466afe0eab18de", shallow_since = "1565379803 -0700" and dropping ["tag"]
DEBUG: Call stack for the definition of repository 'build_bazel_rules_apple' which is a git_repository (rule definition at /home/sitao/.cache/bazel/_bazel_sitao/196738a4e5710d43dc3e6a26d08dcdc0/external/bazel_tools/tools/build_defs/repo/git.bzl:181:18):
- /home/sitao/development/mediapipe/WORKSPACE:251:1
INFO: Call stack for the definition of repository 'remotejdk11_linux' which is a http_archive (rule definition at /home/sitao/.cache/bazel/_bazel_sitao/196738a4e5710d43dc3e6a26d08dcdc0/external/bazel_tools/tools/build_defs/repo/http.bzl:237:16):
- /DEFAULT.WORKSPACE.SUFFIX:199:1
ERROR: /home/sitao/development/mediapipe/mediapipe/examples/android/src/java/com/google/mediapipe/apps/handtrackinggpu/BUILD:64:1: //mediapipe/examples/android/src/java/com/google/mediapipe/apps/handtrackinggpu:mediapipe_lib depends on @com_google_code_findbugs//jar:jar in repository @com_google_code_findbugs which failed to fetch. no such package '@com_google_code_findbugs//jar': Failed to fetch Maven dependency: Could not transfer artifact com.google.code.findbugs:jsr305:jar:3.0.2 from/to com_google_code_findbugs (https://repo1.maven.org/maven2/): connect timed out
ERROR: Analysis of target '//mediapipe/examples/android/src/java/com/google/mediapipe/apps/handtrackinggpu:handtrackinggpu' failed; build aborted: no such package '@com_google_code_findbugs//jar': Failed to fetch Maven dependency: Could not transfer artifact com.google.code.findbugs:jsr305:jar:3.0.2 from/to com_google_code_findbugs (https://repo1.maven.org/maven2/): connect timed out
INFO: Elapsed time: 10.175s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)
I can access the link https://repo1.maven.org/maven2 through browser and find findbug folder.
Answer
questions
jiuqiant
I just tried the bazel build command and it works ok. So, I guess it's a temporarily network issue. Could you retry it? If you prefer to cache the downloaded external dependencies, see https://github.com/google/mediapipe/issues/3#issuecomment-506926022. We will be working on generating an archive file of MediaPipe's external dependencies for the users who have the trouble with the external dependencies.
Related questions