Missing artifact com.github.pagehelper:pagehelper:jar:3.4.2解决

Missing artifact com.github.pagehelper:pagehelper:jar:3.4.2

  • 问题无所谓大小,只要对你造成阻碍的都为问题。

在使用maven的时候碰到Missing artifact com.github.pagehelper:pagehelper:jar:3.4.2的问题。
网上搜罗一番说是如下原因:

在父工程中已经确定jar的version,但是jar下载不下来,可能存在两种情况

  1. 该jar包非免费,需要付费,所以下载不下来
  2. 网络原因,连接不到国外的服务器
  • 这里我再补充一点 “版本号写的不对” 也可能导致此问题,版本号填错了当然找不到了。
    这个-fix 是mybatis分页的jar ,是在官方的基础上修改而来的。 当然会找不到这个jar,一般是自己改后改的名。

修改前:
Missing artifact com.github.pagehelper:pagehelper:jar:3.4.2解决

就是多了后边的 -fix
去掉如下:
Missing artifact com.github.pagehelper:pagehelper:jar:3.4.2解决
如果是父工程的话,修改后可能子工程会报错,原因是工程版本不对,如下方式更新即可

然后更新项目:
右击 父工程 -> maven -> Update Project 如下图 :
Missing artifact com.github.pagehelper:pagehelper:jar:3.4.2解决

Missing artifact com.github.pagehelper:pagehelper:jar:3.4.2解决
最后点击ok , 即可 , 问题解决