0

我正在尝试构建 Apache Gora,您可以在此处找到它,我已将其作为模块化 apache maven 项目下载。当我尝试使用execute maven来自 eclipse 的install目标构建 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:\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 //////

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

4

1 回答 1

1

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

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

于 2014-11-26T04:55:14.590 回答