hive源碼編譯(失敗記錄)
編譯hive 源碼的命令:
mvn clean install -T 4C?-DskinpTests
出現如下報錯:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project metastore-tools-common: Execution default-compile of goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile failed:?
Plugin org.apache.maven.plugins:maven-compiler-plugin:3.8.1 or one of its dependencies could not be resolved:
Could not transfer artifact com.google.errorprone:javac:jar:9+181-r4173-1 from/to alimaven (http://maven.aliyun.com/nexus/content/repositories/central/): Authorization failed for http://maven.aliyun.com/nexus/content/repositories/central/com/google/errorprone/javac/9+181-r4173-1/javac-9+181-r4173-1.jar 403 Forbidden -> [Help 1]
###############################################################################################
整個意思是javac-9+181-r4173-1.jar因為阿里云的maven倉庫的403權限問題無法下載
下面開始排查com.google.errorprone是哪個pom.xml寫入的依賴需求
在maven上找到了這么個鏈接:
https://mvnrepository.com/artifact/com.google.errorprone/javac/9+181-r4173-1
對應的pom是:
<dependency>
? ? <groupId>com.google.errorprone</groupId>
? ? <artifactId>javac</artifactId>
? ? <version>9+181-r4173-1</version>
</dependency>
那么也就是說hive的源碼文件夾中存在上述pom遇到了403報錯導致編譯失敗了.
查找作妖的具體是哪個pom,查找過程如下 :
(Python3.6) appleyuchi@Desktop:~/桌面/hive$ **grep -r com.google.errorprone\<**
①standalone-metastore/metastore-tools/metastore-benchmarks/pom.xml: ? ? ? ? ? ?<groupId>com.google.errorprone</groupId>
②standalone-metastore/metastore-tools/tools-common/pom.xml: ? ? ? ? ? ?<groupId>com.google.errorprone</groupId>
也就是說,$HIVE_HOME/pom.xml中的standalone-metastore這個module出了編譯故障.
###############################################################################################
先去這個pom.xml里面注釋掉其他的只留下下面兩個,
? ? <module>upgrade-acid</module>
? ? <module>kafka-handler</module>
因為這兩個由于standalone-metastore的故障導致沒有進行編譯,我們來編譯檢查下是否會出現問題.
運行之后看了下沒啥問題.
也就是說這個hive的編譯只剩下standalone-metastore這個模塊了.
####################################################################################################
$HIVE_HOME/pom.xml只留下standalone-metastore
然后①②兩個pom.xml的com.google.errorprone的
</dependency>前面加入:
<scope>system</scope>
<systemPath>/home/appleyuchi/桌面/javac-9+181-r4173-1.jar</systemPath>
?
像下面這樣
? ? ? ? ? <dependency>
? ? ? ? ? ? <groupId>com.google.errorprone</groupId>
? ? ? ? ? ? <artifactId>error_prone_core</artifactId>
? ? ? ? ? ? <version>${errorprone.core.version}</version>
? ? ? ? ? ? <scope>system</scope>
?? ??? ??? ??? ?<systemPath>/home/appleyuchi/桌面/javac-9+181-r4173-1.jar</systemPath>
? ? ? ? ? </dependency>
###############################################################################################
?
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project metastore-tools-common: Fatal error compiling: CompilerException: InvocationTargetException: com/google/errorprone/ErrorProneCompiler$Builder: com.google.errorprone.ErrorProneCompiler$Builder -> [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
?
搞不定,醉了.....
?
?
?
?
創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎總結
以上是生活随笔為你收集整理的hive源碼編譯(失敗記錄)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 微博app如何发微博(微博搜索的微博)
- 下一篇: org.apache.hadoop.hi