gpt4 book ai didi

maven - 无法使用 Java8 构建 Hadoop 2.4.1

转载 作者:可可西里 更新时间:2023-11-01 14:09:41 26 4
gpt4 key购买 nike

这个问题很简单。我正在尝试使用以下命令在 Windows 上编译 Hadoop2.4.1:

mvn clean package -Pdist,native-win -DskipTests -Dtar

使用 JAVA_HOME=C:\Program Files\Java\jdk1.7.0_51,它工作正常。

使用 JAVA_HOME=C:\Program Files\Java\jdk1.8.0_05 时,它不会并失败,并给出以下错误:

[INFO] Apache Hadoop Annotations ......................... FAILURE [4.086s]
---
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.8
.1:jar (module-javadocs) on project hadoop-annotations: MavenReportException: Er
ror while creating archive:
[ERROR] Exit code: 1 - C:\hadoop-src\hadoop-common-project\hadoop-annotations\sr
c\main\java\org\apache\hadoop\classification\InterfaceStability.java:27: error:
unexpected end tag: </ul>
[ERROR] * </ul>
[ERROR] ^
[ERROR]
[ERROR] Command line was: "C:\Program Files\Java\jdk1.8.0_05\jre\..\bin\javadoc.
exe" -J-Dhttp.proxySet=true -J-Dhttp.proxyHost=proxy -J-Dhttp.proxyPort=3128 @op
tions @packages
[ERROR]
[ERROR] Refer to the generated Javadoc files in 'C:\hadoop-src\hadoop-common-pro
ject\hadoop-annotations\target' dir.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE
xception
[ERROR]

如前所述,除了 JAVA_HOME 外,我没有做任何更改。错误消息似乎表明错误与代理相关,但我不知道为什么。

在这两种情况下,我都有

C:\hadoop-src>javac -version
javac 1.8.0_05

C:\hadoop-src>java -version
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)

你们能知道发生了什么事吗?

最佳答案

替代 Stuarts 的建议(我很难找到放置附加参数的位置):为了完全跳过 javadoc 生成,只需运行

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

关于maven - 无法使用 Java8 构建 Hadoop 2.4.1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24615547/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com