当前位置: 首页 > article >正文

Apache Hive源码阅读环境搭建

前置软件:
JDK 1.8
Maven 3.3.9

1 下载源码

# 下载源码
git clone https://github.com/apache/hive.git

cd hive

# 查看标签
git tag

# 切换到要阅读的指定版本的tag
git checkout rel/release-2.1.0

2 编译源码

mvn clean install -DskipTests

执行报错

日志如下

E:\os_ws\hive\common>mvn clean install -DskipTests
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Hive Common 2.1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ hive-common ---
[INFO] Deleting E:\os_ws\hive\common\target
[INFO] Deleting E:\os_ws\hive\common (includes = [datanucleus.log, derby.log], excludes = [])
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-no-snapshots) @ hive-common ---
[INFO]
[INFO] --- maven-antrun-plugin:1.7:run (generate-version-annotation) @ hive-common ---
[INFO] Executing tasks

main:
     [exec] /bin/bash: E:os_wshivecommon/src/scripts/saveVersion.sh: No such file or directory
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.992 s
[INFO] Finished at: 2022-05-17T15:31:30+08:00
[INFO] Final Memory: 17M/298M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (generate-version-annotation) on project hive-common: An Ant BuildException has occured: exec returned: 127
[ERROR] around Ant part ...<exec failοnerrοr="true" executable="bash">... @ 4:46 in E:\os_ws\hive\common\target\antrun\build-main.xml
[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

3 解决报错

找了很多类似的问题,他们的解决方法不太适用于我的情况

果断自己想办法解决,既然hive-common打包报错那就下载好common包

3.1 下载hive-common的jar包

1 浏览器打开https://mvnrepository.com/

2 输入hive common点击回车搜索jar包

3 找到需要的版本
在这里插入图片描述

4 点击下载jar

在这里插入图片描述
5 回到命令行将jar包install到本地maven仓库

mvn install:install-file -DgroupId=org.apache.hive -DartifactId=hive-common -Dversion=2.1.0 -Dpackaging=jar -Dfile=E:\download\browser\hive-common-2.1.0.jar
  • -DgroupId=org.apache.hive 指定groupid
  • -DartifactId=hive-common 指定artifactId
  • -Dfile=E:\download\browser\hive-common-2.1.0.jar 指定jar包所在路径

3.2 注释掉antrun插件

找到hive\common\pom.xml将264行到286行的maven-antrun-plugin注释掉

在这里插入图片描述

3.3 再次执行编译命令

mvn clean install -DskipTests

终于编译成功了
在这里插入图片描述


http://www.kler.cn/news/135098.html

相关文章:

  • 数据集成实施过程注意点总结
  • clusterProfiler包学习
  • 【数据结构初阶】单链表SLlist
  • STM32——STM32Cubemx的学习使用总结
  • C++类与对象(1)—初步认识
  • [Kettle] 生成随机数
  • 【LeetCode刷题】--9.回文数
  • Figma 插件学习(一)
  • STM32框架之按键扫描新思路
  • Burpsuite抓HTTPS证书导入问题
  • 《rPPG》——(1)PyTorch——Windows环境配置
  • 如何使用MybatisPlus进行数据分页显示
  • SpringMVC log4j1升级log4j2
  • 数据采集与大数据架构分享
  • uniapp App 端 版本更新检测
  • 刷题方法论
  • 中国智能音箱市场销量下降,百度稳居第一 /中国即评出10个大模型创新案例 |魔法半周报
  • Dockerfile基础
  • 前台查看日志功能
  • RK3568 + YT 9215交换机芯片,MAC TO MAC 调试记录
  • 有趣的按钮分享
  • 【备忘录】Docker容器、镜像删除与资源清理命令
  • PC3329L DC-DC降压 10V-100V输入3A大流输出带EN功能实现零功耗只需极少元器件
  • 如何解决 Critical dependency: the request of a dependency is an expression ?
  • 全国行业就业数据,了解第一二三产业的就业人数~
  • 打不开github网页解决方法
  • MFC 对话框
  • Scala--- Actor通信模型
  • sqli-labs关卡18(基于http头部报错盲注)通关思路
  • 同一台Linux同时安装MYSQL5.7和MYSQL8(第二篇)