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")