bazelbuild / rules_appengine

AppEngine rules for Bazel
Apache License 2.0
30 stars 51 forks source link

target 'appengine/java/api' not declared in package 'external' #54

Open MirkoRossini opened 7 years ago

MirkoRossini commented 7 years ago

Hello,

I'm trying to make the bookshelf example app in the google documentation work with Bazel.

I can't build though. I run into this:

$ bazel build :myapp INFO: $TEST_TMPDIR defined: output root default is '/spare/local/bazel/'. ......................... ERROR: /spare/local/code/appengine/BUILD:17:1: no such target '//external:appengine/java/api': target 'appengine/java/api' not declared in package 'external' defined by /spare/local/code/appengine/WORKSPACE and referenced by '//:mylib'. ERROR: Analysis of target '//:myapp' failed; build aborted. INFO: Elapsed time: 2.065s

I attached my BUILD and WORKSPACE files.

Thanks

Mirko

configuration.zip

MirkoRossini commented 7 years ago

I got it to work by adding this to the WORKSPACE:

bind(name='appengine/java/api', actual='@com_google_appengine_java//:api')

I'm totally new to bazel so there's probably a smarter way to make it work, but you may want to add something to the documentation so that it works out of the box