简体   繁体   English

Eclipse Maven构建编译器失败-无stacktrace

[英]Eclipse maven build compiler failure - no stacktrace

I'm trying to build Apache Gora, which you can find here and I've downloaded it as a modular apache maven project. 我正在尝试构建Apache Gora,您可以在这里找到它,我已经将其下载为模块化apache maven项目。 When I try to build gora with an execute maven from eclipse with the install goal I get the following error: 当我尝试使用具有install目标的eclipse 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

It also tells me the following: 它还告诉我以下内容:

[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to C:\Users\pmgbe_000\git\gora\gora-compiler\target\classes
[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 //////

But, if I re-run the install without a workspace clean in the next run it builds correctly the Compiler module. 但是,如果我在下一次运行中重新运行安装时没有clean的工作区,那么它将正确构建编译器模块。 If I re-run again the following module gets a success and so on. 如果我再次运行,以下模块将成功执行,依此类推。 I can't make heads or tails of what's happening here. 我无法弄清这里发生的事情。

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

If you're running Maven from Eclipse (eg Run As : Maven Install), make sure your environment is configured with correct JRE (you'll need JDK, not JRE). 如果您是从Eclipse运行Maven(例如,运行方式:Maven Install),请确保您的环境配置了正确的JRE(您将需要JDK,而不是JRE)。 Go to Window -> Preferences -> Java -> Installed JRE. 转到窗口->首选项-> Java->已安装的JRE。 Select JDK if it's there or add JDK if it's not. 如果有,请选择JDK;否则请选择。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM