[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 就可以了
 
 

spring boot 打包报错的更多相关文章

  1. 【原创】大叔经验分享(67)spring boot启动报错

    spring boot 启动报错: Caused by: java.lang.IllegalArgumentException: LoggerFactory is not a Logback Logg ...

  2. Spring boot 启动报错 Failed to auto-configure a DataSource

    1.Spring boot 启动报错 Failed to auto-configure a DataSource 参考资料https://blog.csdn.net/liuyinfei_java/ar ...

  3. spring Boot启动报错Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: org.springframework.core.annotation.AnnotatedElementUtils.getAnnotationAttributes

    spring boot 启动报错如下 org.springframework.context.ApplicationContextException: Unable to start web serv ...

  4. 解决spring boot启动报错java.lang.NoClassDefFoundError: ch/qos/logback/classic/Level

    解决spring boot启动报错java.lang.NoClassDefFoundError: ch/qos/logback/classic/Level 学习了:https://blog.csdn. ...

  5. spring boot 启动报错(spring-boot-devtools热部署后):The elements [spring.resources.cache-period] were left unbound. Update your application's configuration

    详细错误代码: *************************** APPLICATION FAILED TO START *************************** Descript ...

  6. [Java]Java 9运行Spring Boot项目报错的解决办法

    简介 为了学习和尽快掌握 Java 9 的模块化(Module System)新特性,最近安装了 JDK 9,新建了一个 Spring Boot 进行尝试, 过程中遇到了一下报错问题,写下此文谨作为个 ...

  7. Spring Boot 启动报错 Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 37

    使用命令 java -jar springBoot.jar  启动项目,结果报错如下: Exception at java.lang.String.substring(String.java:) at ...

  8. spring boot启动报错Error starting ApplicationContext(未能配置数据源)

    主要错误:Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource c ...

  9. spring boot 启动报错No active profile set, falling back to default profiles

    报错No active profile set, falling back to default profiles pom.xml加上下面两个依赖 <dependency> <gro ...

随机推荐

  1. java对象详解

    java对象及线程详解 内存布局 普通对象布局 数组的内存布局 内部类的内存布局 对象分解 对象头-mark word(8字节) 实例数据 对齐填充(可选) java锁分析 volatile关键字 v ...

  2. 浅谈RBF函数

    所谓径向基函数 (Radial Basis Function 简称 RBF), 就是某种沿径向对称的标量函数. 通常定义为空间中任一点x到某一中心xc之间欧氏距离的单调函数 , 可记作 k(||x-x ...

  3. Visio插入竖直省略号

    不去想省略号,想效果,插入文本框,输入点号,换行,三次就ok.

  4. java以流的形式输出文件

    原文:http://blog.csdn.net/liutt55/article/details/78126614 public void downProcessFile(HttpServletRequ ...

  5. druid 配置监控界面和开启spring支持

    1.配置监控页面 <!-- JNDI方式配置数据源 --> <!-- <bean id="dataSource" class="org.sprin ...

  6. Android Http POST文件上传之-----RFC1867协议

    RFC1867协议介绍            RFC1867协议主要是在HTTP协议的基础上为INPUT标签添加了file属性.同一时候限定了Form的method必须为POST,ENCTYPE必须为 ...

  7. JavaScript破解验证码

    现在,Megaupload站点提供的CAPTCHA在上述代码面前已经败下阵来,说实话,这里的验证码设计的不不太好.但更有趣的是: 1.HTML 5中的Canvas应用程序接口getImageData可 ...

  8. ubuntu14.04使用samba共享文件

    samba是linux中常用的共享文件的软件 ubuntu12.04及以上版本中已经安装了samba 开始配置: samba配置文件: /etc/samba/smb.conf可以修改配置文件来设置sa ...

  9. 面试题:判断两个字符串是否互为回环变位(Circular Rotaion)

    题干:   如果字符串 s 中的字符循环移动任意位置之后能够得到另一个字符串 t,那么 s 就被称为 t 的回环变位(circular rotation).   例如,ACTGACG 就是 TGACG ...

  10. g++ 链接静态库命令应该放在最后

    昨天编译去年写的FloorServer,居然一堆错误: chu@chu-laptop:/media/E/work/github/FloorServer/FloorServer$ makeg++ -g ...