idea 中maven在仓库中找不到

首先可以修改maven镜像,改成国内镜像

在上步行不通的情况下

可以进行下面的设置

首先jar包下载下来,打开maven的设置

 

 

 将下面代码改成自己的实际,插入到3中

mvn install:install-file 
-Dfile={$jar包地址}
-DgroupId={$jar包的groupid}
-DartifactId={$jar包的依赖}
-Dversion={$版本号}
-Dpackaging=jar

举例说明

mvn install:install-file 
-Dfile=/Users/meiyouhoulai/Desktop/ecloud-sdk-face-1.1.0-jar-with-dependencies.jar
-DgroupId=com.chinamobile.ecloud
-DartifactId=ecloud-sdk-face
-Dversion=1.1.0
-Dpackaging=jar

 

 

 

在pom.xml中的输入

 <dependency>
      <groupId>com.chinamobile.ecloud</groupId>
      <artifactId>ecloud-sdk-face</artifactId>
      <version>1.1.0</version>
 </dependency>
        

运行一下就可以了

 

posted @ 2022-05-17 09:11  大雄的脑袋  阅读(506)  评论(0编辑  收藏  举报