Open dclements opened 6 years ago
On inspection I found that in _war_impl
on the relative path code it was producing foo-gae.wa/webapp
which looked… suspicious. So I substituted it out with foo-gae.war/webapp
directly in the code. This caused build the war correctly, but it still wouldn't run with bazel run
, giving the same error reported above. When I replaced it with just webapp
it seems to have created the war successfully and launches more-or-less correctly (there's a classloader problem, but that may be a configuration on my end).
@dclements do you happen to have a branch of this online? Or can point me to the specific place you changed? I'm seeing the issue but couldn't find what you're talking about
Well at HEAD with a recent bazel on linux or Mac I can bazel run //examples/java:examples
and it works fine.
Looking at the example you have jars = [":java-maven-lib"],
in your appengine_war
Maybe we should try and fix it for you -- but as-is you need to specify the '_deploy.jar' which is an implicit output that creates a mega-jar from all of the small per-lib jars.
So change to
jars = [":java-maven-lib_deploy.jar"],
and try again
This to me looks more or less identical to the
README
example. Am I missing something simple?Bazel version:
.bazelrc
:Structure of project:
WORKSPACE
:BUILD
:I build it and then run it (with
bazel run //:foo-gae -- --port=12345
), and it generates the following exception:When I open up
bazel-bin/foo-gae.war
: I see the following structure: