maven工程依赖的jar包,在本地仓库有,但是pom.xml文件却报错找不到jar包

例如:Missing artifact com.ibm.db2:db2jcc_license_cisuz:jar:10.1  

但在我本地的仓库中却存在这个jar包,

查找了很多的资料发现了两种解决方法:

第一种:

    在eclipse中的window->show view->other->maven Repositories打开maven Repositories视图,

    然后在maven Repositories视图中选中local Repositories->Local Repository, 右键选择Rebuild Index;

第二种:

    在找到错误中的jar包所在本地路径,找到与jar包同文件夹下的_remote.repositories,

    删除_remote.repositories文件 或者修改>XX=为>=(即删除main,当然main也可能是其他值);

    然后再右键工程maven->update project;


猜你喜欢

转载自blog.csdn.net/ljw499356212/article/details/79911509