为 64 位编译 Hadoop 时的 Maven 异常
Maven exception in compiling Hadoop for 64bits
我正在使用 Maven 在 Ubunto 64 位上编译 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
问题出在创建javadoc,所以解决方法就是指定命令mvn 以便使用附加参数 跳过 javadoc 生成Dmaven.javadoc.skip=true 如下:
mvn clean package -Pdist,native-win -DskipTests -Dtar -Dmaven.javadoc.skip=true
致谢名单 here
我正在使用 Maven 在 Ubunto 64 位上编译 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
问题出在创建javadoc,所以解决方法就是指定命令mvn 以便使用附加参数 跳过 javadoc 生成Dmaven.javadoc.skip=true 如下:
mvn clean package -Pdist,native-win -DskipTests -Dtar -Dmaven.javadoc.skip=true