Loading

Could not find artifact org.pentaho:pentaho-aggdesigner-algorithm:pom:5.1.5-jhyde ... 解决方式

在Spark连接Hive导入相关maven依赖时

<dependency>
    <groupId>org.apache.hive</groupId>
    <artifactId>hive-exec</artifactId>
    <version>2.3.4</version>
</dependency>

出现以下错误:

Could not find artifact org.pentaho:pentaho-aggdesigner-algorithm:pom:5.1.5-jhyde in ...

是因为这个包不在阿里云公共maven镜像仓库上,需要添加一个新的镜像仓库,修改maven的settings.xml

<!-- 添加这个镜像仓库在阿里云公共仓库前面 -->
<mirror>
  <id>aliyunmaven</id>
  <mirrorOf>*</mirrorOf>
  <name>spring-plugin</name>
  <url>https://maven.aliyun.com/repository/spring-plugin</url>
</mirror>
<mirror>
  <id>aliyunmaven</id>
  <mirrorOf>*</mirrorOf>
  <name>阿里云公共仓库</name>
  <url>https://maven.aliyun.com/repository/public</url>
</mirror>

之后重新导入依赖即可:
mvn package
如果是idea开发,需要重启idea,刷新依赖即可。
在这个包下载完后,可以把新增的阿里云spring-plugin镜像仓库注释掉,依旧优先使用阿里云公共仓库。


备注:

阿里云公共仓库旧版地址

<mirror> 
  <id>nexus-aliyun</id> 
  <mirrorOf>*</mirrorOf> 
  <name>Nexus aliyun</name> 
  <url>http://maven.aliyun.com/nexus/content/groups/public</url> 
</mirror>

新版地址

<mirror>
  <id>aliyunmaven</id>
  <mirrorOf>*</mirrorOf>
  <name>阿里云公共仓库</name>
  <url>https://maven.aliyun.com/repository/public</url>
</mirror>

阿里云云效Maven
https://developer.aliyun.com/mvn/guide


posted @ 2022-09-04 12:25  Convict  阅读(3711)  评论(0编辑  收藏  举报