部分错误信息:

[ERROR] Failed to execute goal on project convention-center: Could not resolve dependencies for project com.***:jar:0.0.1-SNAPSHOT: Failure to find net.sf.json-lib:json-lib:jar:2.4 in http://maven.aliyun.com/nexus/content/repositories/central/ was cached in the local repository, resolution will not be reattempted until the update interval of alimaven has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :***

错误信息中的*是我的模块名

我的项目是一个父项目两个子模块

当时报错后,我先去的maven仓库查看jar文件,确定有,在idea中更新了maven后,重新打包,依然报错

经过各方面的搜索,尝试各种解决办法后,依然不行。

后来我就把这个jar包给删掉了,重新install了jar包

步骤为:

从仓库中将后缀为.jar的文件拿出来放到了e盘(注:不一定非要e盘,其他路径也可以)

然后从仓库中删除这个jar的文件夹

因我的net目录下还有其他的jar,所以才在这个层级的目录删除

删除后,打开cmd窗口,输入如下命令:

mvn install:install-file -Dfile=E:\json-lib-2.4-jdk15.jar -DgroupId=net.sf.json-lib -DartifactId=json-lib -Dversion=2.4 -Dpackaging=jar

命令解析:

关于mvn的install命令我在之前的文章中有过解析说明已经比较全面了

所以我只贴出地址,各位对命令不太明白的可以跳转至如下地址去了解

https://blog.csdn.net/qq_41985474/article/details/102929723

重新install后,maven仓库就会重新生成文件

这时候再重新去对项目进行打包操作:

命令:mvn -Dmaven.test.skip=true clean compile package

打包命令解析:

这样是跳过测试,然后clean、编译再打包,如果你想放到本地仓库,就在后面加个deploy

按这个步骤操作的话,应该就不会报如上错误信息了

打包成功后将带有main方法入口的模块中的target目录中的jar文件放到服务器上发布即可

如果对我的说明有疑问和建议的话,请给我留言。接受任何批评和指点,谢谢!

springboot项目打包报错相关推荐

  1. SpringBoot项目启动报错:Field userMapper in com.demo.controller.MemberController required a bean of type ‘c

    问题描述: SpringBoot项目启动报错,报错内容:'com.xxx.mapper.XxxxMapper' that could not be found ******************** ...

  2. electron项目打包报错

    electron项目打包报错 打包下载错误 Error: getaddrinfo ENOENT github-production-release-asset-2e65be.s3.amazonaws. ...

  3. SpringBoot项目启动 报错:Error executing Maven. end tag name </settings> must match start tag name

    SpringBoot项目启动 报错:Error executing Maven. end tag name must match start tag name from line xxx 第一次创建s ...

  4. 社区版IDEA创建SpringBoot项目及报错Error: Request failed with status code 404解决

    社区版IDEA创建SpringBoot项目 IDEA创建由于社区版没有创建SpringBoot的工具,我们一般使用插件进行创建 搜索插件spring assistant 进行下载 下载后我们进行项目创 ...

  5. vue 项目打包报错 CSS minification error

    vue 项目打包报错 Error: CSS minification error: Lexical error 错误: CSS minification error: Lexical error on ...

  6. idea软件 springboot项目启动报错:命令行太长解决

    idea软件 springboot项目启动报错:命令行太长解决 1.找到项目下得.idea文件夹,打开文件workspace.xml 2.搜索标签 <component name="P ...

  7. springboot项目启动报错-案例情景介绍

    文章目录 摘要 情况1:Nacos报错 情况2:IllegalStateException: Incompatible fallbackFactory instance 情况3:idea编译java文 ...

  8. 【图文详解】SpringBoot项目启动报错:The bean ‘xxxServiceImpl‘ could not be injected as a ‘xxxServiceImpl‘ ...

    问题描述: 项目启动报错:The bean 'xxxServiceImpl' could not be injected as a 'cn.xxxx.service.xxxServiceImpl' b ...

  9. springboot——项目install报错

    项目install报错: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (defa ...

  10. maven多项目打包报错---子模块相互依赖打包时所遇到的问题:依赖的程序包找不到 package xxx does not exist

    场景: springboot 项目多模块已成开发大势所趋,抽出一个parent父工程,子模块基础模块(包含一些公用的实体类和工具类等),以及其他子模块(Module A. Module B -).Mo ...

最新文章

  1. 开心庄园页面HTML素材,练习2:制作开心庄园页面.html
  2. 类视图ListView和DetailView比较
  3. stream获取filter
  4. C#LeetCode刷题之#884-两句话中的不常见单词(Uncommon Words from Two Sentences)
  5. [BZOJ1001]: [BeiJing2006]狼抓兔子
  6. vue手势滚动_vue + any-touch实现一个iscroll 实现拖拽和滑动动画效果
  7. 从零开始学Pytorch(十)之循环神经网络基础
  8. 机器学习集成模型学习——投票集成Voting(二)
  9. 16年的大数据经验,为了搞定数字化转型,我和老板做了个赌注
  10. 【PL/SQL】异常处理
  11. static关键字_一题搞定static关键字
  12. eclipse python_一文教你配置得心应手的Python
  13. C语言开发简单的学生成绩管理系统(附源码)
  14. mac 自带连接ftp服务器,Mac自带FTP工具使用
  15. 统计检验方法 大全,t -test 检验,Anova 检验,卡方检验,Kolmogorov–Smirnov 检验
  16. IT 行业的创新 - 创新的迷思 (7-8)
  17. 判断玩家是否开全图挂
  18. java实现获取当前日期、农历、周
  19. ISO/IEC JTC 1/SC 42人工智能分技术委员会第一次全会在京召开
  20. 四成单身、平均年薪19万、最爱买房,原来真实的程序员是这个样子的…...

热门文章

  1. 牛客网 - [牛客假日团队赛6]Mud Puddles(BFS)
  2. python transforms_Python transforms.Compose方法代码示例
  3. 读v_JULY_v整理笔试题博客有感,整理些答案。
  4. 有哪些支持 HomeKit 的智能家居生态值得推荐?
  5. 【lphtw】第三弹笔记ex24-ex35
  6. 《西部世界》后续,研究人类学能让AI拥有灵魂?
  7. Linux中etc目录详解大全总汇详解
  8. MFC 在Edit Control输入完成后按下回车键希望直接执行某个函数
  9. 约束布局ConstraintLayout ,报错:This view is not constrained vertically
  10. android吃鸡闪退,绝地求生刺激战场iPhone6/6P闪退怎么办