Eclipse maven build compiler failure - no stacktrace



我正在尝试构建Apache Gora,你可以在这里找到它,我已经下载了它作为一个模块化的apache maven项目。当我尝试使用具有install目标的日食execute maven构建 gora 时,出现以下错误:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project gora-compiler: Compilation failure -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project gora-compiler: Compilation failure

它还告诉我以下内容:

[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to C:Userspmgbe_000gitgoragora-compilertargetclasses
[WARNING] Unable to autodetect 'javac' path, using 'javac' from the environment.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Apache Gora ....................................... SUCCESS [10:08 min]
[INFO] Apache Gora :: Compiler ........................... FAILURE [ 27.690 s]
[INFO] Apache Gora :: Compiler-CLI ....................... SKIPPED
[INFO] Apache Gora :: Shims Hadoop ....................... SKIPPED
/////// OTHER MODULES ALSO SKIPPED //////

但是,如果我在下次运行时在没有工作区clean的情况下重新运行安装,它会正确构建编译器模块。如果我再次重新运行,以下模块将获得成功,依此类推。我无法对这里发生的事情做出正面或反面。

根据[WARNING] Unable to autodetect 'javac' path, using 'javac' from the environment.

如果您从 Eclipse 运行 Maven(例如运行方式:Maven Install),请确保您的环境配置了正确的 JRE(您需要 JDK,而不是 JRE)。转到窗口 -> 首选项 -> Java ->已安装的 JRE。如果存在,请选择 JDK,如果没有,请选择添加 JDK。

最新更新