由于https://github.com/kontext-tech/winutils
还未发布3.3.6版本,因此尝试源码编译
环境和安装包准备,见2
- Git-2.43.0-64-bit.exe
- jdk-21_windows-x64_bin.exe
- node-v21.2.0-x64.msi
- apache-ant-1.10.14-bin.zip
- apache-maven-3.9.5-bin.zip
- protoc-25.1-win64.zip
- cmake-3.28.0-rc5-windows-x86_64.zip
- GetGnuWin32-0.6.3.exet
- zlib.tar.gz
- Visual Studio 2010 Professional
- hadoop-3.3.6-src.tar.gz
zlib编译
方法一:
zlib的vs sln解决方案文件包含6个工程。其中:
(1). zlibvc生成动态链接库zlibwapi.dll和对应的导入库zlibwapi.lib
(2). zlibstat生成静态链接库zlibstat.lib
(3). testzlibdll测试生成的动态链接库zlibwapi.dll
(4). testzlib测试生成的静态链接库zlibstat.lib
方法二:
VS命令行工具进入到zlib根目录,执行 nmake -f win32/Makefile.msc
,在根目录下生成:zlib.lib(静态库) zdll.lib(动态库的导入库) zlib1.dll(动态库)
配置文件更改
1. maven阿里云镜像
修改apache-maven-3.9.5路径confsettings.xml
文件镜像mirrors节点,使用阿里云仓库,添加如下代码。
<mirror>
<id>aliyunmaven</id>
<mirrorOf>*</mirrorOf>
<name>阿里云公共仓库</name>
<url>https://maven.aliyun.com/repository/public</url>
</mirror>
不更改会很慢,亲测!!!
2. Node版本
- 编辑
hadoop-3.3.6-srchadoop-yarn-projecthadoop-yarnhadoop-yarn-applicationshadoop-yarn-applications-cataloghadoop-yarn-applications-catalog-webapp
的pom.xml
文件 - find
nodeVersion
,将<nodeVersion>${nodejs.version}</nodeVersion>
改为自己的node版本<nodeVersion>v21.2.0</nodeVersion>
- 如果不更改会出现错误如下。
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.11.2:yarn (yarn install) on project
hadoop-yarn-applications-catalog-webapp: Failed to run task: 'yarn ' failed.
org.apache.commons.exec.
ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [Help 1]
3. 越过Javadoc检查
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
</plugin>
</plugins>
特别是hadoop-3.3.6-srchadoop-common-projecthadoop-annotationspom.xml
需要更改,否则会出现如下错误。
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.0.1:jar (module-javadocs) on project hadoop-annotations: MavenReportException: Error while generating Javadoc:
编译Hadoop
Error,其他报错见3
hadoop-hdfs-projecthadoop-hdfs-native-clienttargetnativebinRelWithDebInfo does not exist
错误是这个目录不存在,则在hadoop-hdfs-projecthadoop-hdfs-native-clienttargetnative
下手动创建这个目录,并根据提示在重新执行命令时添加参数-rf :hadoop-hdfs-native-client
,如下。
mvn package -Pdist,native-win -DskipTests -Dtar -Dmaven.javadoc.skip=true -rf :hadoop-hdfs-native-client
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.x:run (make) on project hadoop-hdfs-native-client: An Ant BuildException has occured: exec returned: 1
[ERROR] around Ant part ...<exec failonerror="true" dir="hadoop路径hadoop-hdfs-projecthadoop-hdfs-native-clienttarget/native" executable="cmake">
修改hadoop-hdfs-projecthadoop-hdfs-native-clientpom.xml
文件failonerror
的值true为false
相关文章:
- windows上编译hadoop
- Windows10 Hadoop3.3.0源码编译
- Hadoop 3.2.1 win10 64位系统 vs2015 编译
- Hadoop源码编译打包
- hadoop源码编译
- Windows 7 64bit和Visual Studio 2010下安装及使用Zlib 1.2.5
- VS2010 编译 Zlib库-1.2.11(zip解压库)
- Windows中zlib的安装与配置
- Unable to build Maven project due to Javadoc error?
- maven项目install时候一直报错,检查Maven-javadoc-plugin声明错误(Java 8 配置Maven-javadoc-plugin)或者警告: @throws没有说明
原文地址:https://blog.csdn.net/feishuoren/article/details/134684024
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若转载,请注明出处:http://www.7code.cn/show_10621.html
如若内容造成侵权/违法违规/事实不符,请联系代码007邮箱:suwngjj01@126.com进行投诉反馈,一经查实,立即删除!