Skip to content

bazel build fails with "name 'http_archive' is not defined" #3

@dbarnett

Description

@dbarnett

I get an error about http_archive not being defined if I just clone the project and execute bazel build //:distribution:

$ bazel build //:distribution
Starting local Bazel server and connecting to it...
ERROR: projects/project-template-java/WORKSPACE:20:1: name 'http_archive' is not defined
ERROR: error loading package 'external': Package 'external' contains errors

It works if I edit WORKSPACE and add this line to load http_archive as recommended in the bazel docs:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions