【问题标题】:apache giraph build errorapache giraph构建错误
【发布时间】:2019-01-20 23:31:28
【问题描述】:

我在编译 giraph 时遇到以下错误。 我正在使用带有 java 1.8 和 maven 3.3.9 的 ubuntu 16.04。遵循 mvn -version 命令的详细信息:

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 命令,但总是遇到同样的错误。你能告诉我我的错误是什么吗?

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

【问题讨论】:

  • 你安装了哪个hadoop版本?

标签: maven giraph


【解决方案1】:

抱歉,我使用的是 jre 而不是 jdk。如记录的,例如, http://roufid.com/no-compiler-is-provided-in-this-environment/https://coderanch.com/t/671424/build-tools/Maven-Compile-Failure-Maven-Thinks, 如果 JAVA_HOME 指向 jre 而不是 jdk,则 maven 无法正常工作。我 重复一遍,我很抱歉我的小问题。

此外,我对使用 jre 成功构建 giraph 1.1 的事实感到困惑,但如果我使用 jre 而不是 jdk,giraph 1.2 会出现上述错误。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-02-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-07-09
    • 2016-01-25
    相关资源
    最近更新 更多