maven工程依赖的jar包,在本地仓库有,但是pom.xml文件却报错找不到jar包
启动项目eclipse报错:
严重: Error configuring application listener of class org.jeecgframework.web.system.listener.InitListener
java.lang.ClassNotFoundException: org.jeecgframework.web.system.listener.InitListener
然后发现是pom.xml有多处错误,提示缺少工件之类的,但是本地仓库确有
Missing artifact org.jeecgframework.p3:jeecg-p3-biz-mail:jar:1.0.0
中文:
缺少工件org.jeecgframework.p3:jeecg-p3-biz-mail:jar:1.0.0
如题:maven工程出现找不到依赖的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;
亲测用第二种方法已解决。
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步