[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.3.0.RELEASE:repackage (default) on project device-factory-service: Execution default of goal org.springframework.boot:spring-boot-maven-plugin:1.3.0.RELEASE:repackage failed: Duplicate library so.dian.dev-device-factory.jar -> [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]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :device-factory-service
 
在执行 mvn clean package 命令打包的时候,抛出上面异常,从错误信息上看,是说device-factory.jar 重复了,我找了半天也不知道这个包怎么重复了,在网上有看见说是插件冲突,我继承了 spring-boot-starter-parent 包和spring-boot-maven-plugin 插件,因为parent中已经有了spring-boot-maven-plugin 插件,所以报错,我按着这个将spring-boot-maven-plugin 删掉确实可以打包了,但是各个工程之间依赖关系并没有打下来。
最后跟一位大佬一起看才知道,我在父工程的pom.xml 定义了
  <build>
    <finalName>device-factory</finalName>
  </build>
因为所有的子工程都继承父的pom,所以其他自工程打出的包也叫device-factory.jar 所以才报重复。后将父工程中finalName删除,果然包打好了,解压后各工程的依赖也在。 我将finalName定义在我web工程pom中,也就是我的入口工程,发布的时候只需要将device-factory.jar 就可以了
 
 

最新文章

  1. 再谈JavaScript闭包及应用
  2. 如何理解vue.js组件的作用域是独立的
  3. textArea 高度自适应
  4. redis常用命令小结
  5. 理解TCP/IP三次握手与四次挥手的正确姿势
  6. Java多线程编程核心技术---单例模式与多线程
  7. 打饭助手之NABC
  8. 【HDU2222】Keywords Search
  9. ambari安装过程中的问题汇总
  10. 17.1.1.6 Creating a Data Snapshot Using Raw Data Files 创建一个数据快照使用 Raw Data Files
  11. all,any函数
  12. windows slaver 脚本执行xcopy 报错无效驱动器规格
  13. 记一次nmap扫描信息收集过程
  14. Python3练习题 011:成绩打分
  15. VM虚拟机截图方法介绍
  16. Oauth2.0(三):Access Token 与 Refresh Token
  17. Java内存管理-初始JVM和JVM启动流程(二)
  18. [SoapUI] 设置最大等待时间,不断重复的去发送一个request,每次从response中获取一个status,直到这个status从一种状态变成另外一种状态
  19. [zabbix] zabbix检测mysql主从状态
  20. Python中__init__.py文件的作用详解

热门文章

  1. 通俗解释遗传算法及其Matlab实现
  2. NSString方法compare详解
  3. Xcode编译错误和警告汇总
  4. Android2017最新面试题(3-5年经验个人面试经历)
  5. dd-wrt端口映射不出去的解决办法
  6. PHP文件包含漏洞总结
  7. javascript快速入门19--定位
  8. JS组件系列——显示隐藏密码切换的jQuery插件
  9. Python 的 LEGB 规则(转载)
  10. ChannelHandlerContext writeAndFlush(firstMessage)