apache giraph 构建错误 [英] apache giraph build error
问题描述
我在编译 giraph 时遇到以下错误.我将 ubuntu 16.04 与 java 1.8 和 maven 3.3.9 一起使用.遵循 mvn -version 命令的详细信息:
I got following error in compiling giraph. I'm using ubuntu 16.04 with java 1.8 and maven 3.3.9. Follows detail of mvn -version command:
Apache Maven 3.3.9
Maven home: /usr/share/maven
Java version: 1.8.0_171, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
我用以下命令克隆
git clone http://git-wip-us.apache.org/repos/asf/giraph.git
因此,我尝试遵循 maven 命令,但总是遇到相同的错误.你能告诉我我的错误是什么吗?
Hence I tryed following maven commands but I got always the same error. Could you please tell me what is my error?
1° 尝试:
mvn -Phadoop_2 -fae -DskipTests clean install
2° 尝试:
mvn -e -DskipTests clean install
我总是得到这个错误:
[INFO] Compiling 994 source files to .../giraph/giraph-core/target/munged/classes
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Apache Giraph Parent ............................... SUCCESS [ 6.020 s]
[INFO] Apache Giraph Core ................................. FAILURE [ 5.081 s]
[INFO] Apache Giraph Blocks Framework ..................... SKIPPED
[INFO] Apache Giraph Examples ............................. SKIPPED
[INFO] Apache Giraph Accumulo I/O ......................... SKIPPED
[INFO] Apache Giraph HCatalog I/O ......................... SKIPPED
[INFO] Apache Giraph Gora I/O ............................. SKIPPED
[INFO] Apache Giraph Distribution ......................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.821 s
[INFO] Finished at: 2018-08-05T12:01:23+00:00
[INFO] Final Memory: 28M/70M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project giraph-core: Compilation failure -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project giraph-core: Compilation failure
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure
at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:749)
at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:118)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 20 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :giraph-core
推荐答案
抱歉,我使用的是 jre 而不是 jdk.例如,据记载,http://roufid.com/no-compiler-is-provided-in-this-environment/ 或https://coderanch.com/t/671424/构建工具/Maven-Compile-Failure-Maven-Thinks,如果 JAVA_HOME 指向 jre 而不是 jdk,maven 不能正常工作.一世重复一遍,我很抱歉我的微不足道的问题.
I apologize, I was using jre instead of jdk. As documented, for example, http://roufid.com/no-compiler-is-provided-in-this-environment/ or https://coderanch.com/t/671424/build-tools/Maven-Compile-Failure-Maven-Thinks, if JAVA_HOME points to jre instead of jdk, maven doesn't properly work. I repeat, I'm sorry for my trivial question.
此外,我很困惑,因为我使用 jre 成功构建了 giraph 1.1,但如果我使用 jre 而不是 jdk,giraph 1.2 会出现上述错误.
Furthermore, I was confusing by the fact that I succeed in build giraph 1.1 with jre but giraph 1.2 gives me above error if I use jre instead of jdk.
这篇关于apache giraph 构建错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!