为64位编译Hadoop的Maven异常

时间:2018-08-06 17:38:48

标签: java maven-3 hadoop2

我正在使用Maven在Ubunto 64bit上编译hadoop 2.4.0 这是有关Maven和JDK版本的信息

$ mvn -version
Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; 2018-02-24T19:49:05Z)
Maven home: /opt/apache-maven
Java version: 1.8.0_181, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre
Default locale: fr_FR, platform encoding: UTF-8
OS name: "linux", version: "4.15.0-29-generic", arch: "amd64", family: "unix"

我遵循了github中的以下教程:Hadoop tuto

但是,此命令失败:

mvn package -Pdist,native -DskipTests -Dtar

错误是:

    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.8.1:jar (module-javadocs) on project hadoop-annotations: MavenReportException: Error while creating archive: [ERROR] Exit code: 1 - /home/ihocine/protobuf-2.5.0/hadoop-common/hadoop-common-project/hadoop-annotations/src/main/java/org/apache/hadoop/classification/InterfaceStability.java:27: error: unexpected end tag: </ul> 
[ERROR]  * </ul> 
[ERROR]    ^ 
[ERROR] 
[ERROR] Command line was: /usr/lib/jvm/java-8-oracle/jre/../bin/javadoc @options @packages 
[ERROR] 
[ERROR] Refer to the generated Javadoc files in '/home/ihocine/protobuf-2.5.0/hadoop-common/hadoop-common-project/hadoop-annotations/target' dir. 
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :hadoop-annotations

1 个答案:

答案 0 :(得分:1)

问题在于创建 javadoc ,因此解决方案只是为命令 mvn 指定为了使用以下附加参数 Dmaven.javadoc.skip = true 跳过 javadoc 生成,如下所示:< / p>

mvn clean package -Pdist,native-win -DskipTests -Dtar -Dmaven.javadoc.skip=true

积分here