I am trying to build plugins for Gerrit 2.16 and I see the below error everytime. Can someone please help? I am running it with Java 8.
$ java -version
openjdk version "1.8.0_242"
OpenJDK Runtime Environment (build 1.8.0_242-8u242-b08-0ubuntu3~16.04-b08)
OpenJDK 64-Bit Server VM (build 25.242-b08, mixed mode)
$ ls -la /etc/alternatives/java
/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
gerrit$ bazel build plugins/changemessage
WARNING: Output base '/homes/spsgupta/.cache/bazel/_bazel_spsgupta/62bf4779654d000114c7917c8a51ecca' is on NFS. This may lead to surprising failures and undetermined behavior.
INFO: Invocation ID: 3f6cc866-a619-4a45-812f-6e6550a0df81
INFO: Analyzed target //plugins/changemessage:changemessage (1 packages loaded, 12 targets configured).
INFO: Found 1 target...
ERROR: /homes/spsgupta/.cache/bazel/_bazel_spsgupta/62bf4779654d000114c7917c8a51ecca/external/bazel_tools/tools/jdk/BUILD:309:1: Action external/bazel_tools/tools/jdk/platformclasspath.jar failed (Exit 1) java failed: error executing command external/remotejdk11_linux/bin/java -XX:+IgnoreUnrecognizedVMOptions '--add-exports=jdk.compiler/com.sun.tools.javac.platform=ALL-UNNAMED' -cp ... (remaining 4 argument(s) skipped)
Use --sandbox_debug to see verbose messages from the sandbox
Exception in thread "main" java.lang.IllegalArgumentException: external/local_jdk
at jdk.compiler/com.sun.tools.javac.file.Locations$SystemModulesLocationHandler.update(Locations.java:1853)
at jdk.compiler/com.sun.tools.javac.file.Locations$SystemModulesLocationHandler.handleOption(Locations.java:1798)
at jdk.compiler/com.sun.tools.javac.file.Locations.handleOption(Locations.java:2062)
at jdk.compiler/com.sun.tools.javac.file.BaseFileManager.handleOption(BaseFileManager.java:269)
at jdk.compiler/com.sun.tools.javac.file.BaseFileManager$2.handleFileManagerOption(BaseFileManager.java:222)
at jdk.compiler/com.sun.tools.javac.main.Option.process(Option.java:1138)
at jdk.compiler/com.sun.tools.javac.main.Option.handleOption(Option.java:1086)
at jdk.compiler/com.sun.tools.javac.file.BaseFileManager.handleOption(BaseFileManager.java:232)
at jdk.compiler/com.sun.tools.javac.main.Arguments.doProcessArgs(Arguments.java:390)
at jdk.compiler/com.sun.tools.javac.main.Arguments.processArgs(Arguments.java:347)
at jdk.compiler/com.sun.tools.javac.main.Arguments.init(Arguments.java:246)
at jdk.compiler/com.sun.tools.javac.api.JavacTool.getTask(JavacTool.java:185)
at DumpPlatformClassPath.dumpJDK9AndNewerBootClassPath(DumpPlatformClassPath.java:106)
at DumpPlatformClassPath.main(DumpPlatformClassPath.java:67)
Target //plugins/changemessage:changemessage failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 1.464s, Critical Path: 0.92s
INFO: 0 processes.
FAILED: Build did NOT complete successfully