zoukankan      html  css  js  c++  java
  • 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;
     

    亲测用第二种方法已解决。

  • 相关阅读:
    Vim配置IDE开发环境
    Win7任务计划自由预设系统定时自动关机
    awk中文手册
    awk简明教程
    Linux之mount命令详解
    VirtualBox内Linux系统与Windows共享文件夹
    堆排序详解
    int main(int argc,char* argv[])参数详解
    GDB调试详解
    VirtualBox中虚拟Ubuntu添加新的虚拟硬盘
  • 原文地址:https://www.cnblogs.com/package-java/p/11341791.html
Copyright © 2011-2022 走看看