在eclipse的maven插件中搜索本地仓库中的jar搜索不到的解决方案

  之前,用过maven管理项目的童鞋都知道本地会有一个${User_Home}.m2/repository仓库 是用来存放jar包的地方。但是,在eclipse中的maven仓库中 搜索不到本地仓库中的jar包。

  原因是因为maven中的本地仓库的index索引没有更新,导致在eclipse的maven插件中搜索不到。

  解决方案:

  在eclipse中打开菜单 window-> show view –> other –> Maven -> maven repositories

  打开之后,选择local repositories –> local repository ,右击,选择Build index.

  在eclipse的maven插件中搜寻本地仓库中的jar搜索不到的解决方案

  更新完索引之后,在通过右键单击pom.xml文件选择maven –> add dependency 或者是打开pom.xml文件,选择dependencies –>add 时,就可以搜索到本地仓库的jar包了。

  如下图:

  在eclipse的maven插件中搜寻本地仓库中的jar搜索不到的解决方案

  如果想搜索公服上的jar

  就选择Global Repositories ->右击 update index. (此处更新比较慢,需要耐心等候)

 

     原文地址:http://www.educity.cn/wenda/469741.html

相关文章:

  • 2022-12-23
  • 2021-04-07
  • 2021-11-24
  • 2021-04-17
  • 2022-12-23
  • 2022-12-23
  • 2021-12-20
  • 2021-12-10
猜你喜欢
  • 2021-12-06
  • 2022-12-23
  • 2021-11-05
  • 2021-07-23
  • 2021-07-12
  • 2021-11-28
  • 2022-12-23
相关资源
相似解决方案