编译 hive 3.1.2 出现 Unknown host snapshots.maven.codehaus.org 错误的解决方法

编译 Hive 3.1.2 出现以下错误:

[ERROR] Failed to execute goal on project hive-service: 
Could not resolve dependencies for project org.apache.hive:hive-service:jar:3.1.2: 
Failed to collect dependencies at org.apache.directory.server:apacheds-server-integ:jar:1.5.6 -> org.apache.directory.client.ldap:ldap-client-api:jar:0.1-SNAPSHOT: 
Failed to read artifact descriptor for org.apache.directory.client.ldap:ldap-client-api:jar:0.1-SNAPSHOT: 
Could not transfer artifact org.apache.directory.client.ldap:ldap-client-api:pom:0.1-SNAPSHOT from/to maven-snapshot-server (http://snapshots.maven.codehaus.org/maven2/): snapshots.maven.codehaus.org: 
Unknown host snapshots.maven.codehaus.org -> [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/DependencyResolutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :hive-service

错误的原因是 codehaus 服务器关闭,网页 http://snapshots.maven.codehaus.org/maven2/ 打不开。

解决方案:

打开 maven 设置文件 /usr/local/maven/conf/settings.xml,在 repositories 里增加一个 repository

<repository>
    <id>Codehaus repository</id>
    <name>codehaus-mule-repo</name>
    <url>https://repository-master.mulesoft.org/nexus/content/groups/public/</url>
    <layout>default</layout>
</repository>

Hive 可以编译了。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值