SpringBoot项目运行正常打包报错[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin

Love The Way You Lie 2023-06-12 09:48 26阅读 0赞

错误信息: [ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.0.1.RELEASE:repackage (default) on project xc-framework-common: Execution default of goal org.springframework.boot:spring-boot-maven-plugin:2.0.1.RELEASE:repackage failed:
解决方式:
去除如下插件可以解决:

  1. <plugin>
  2. <groupId>org.springframework.boot</groupId>
  3. <artifactId>spring-boot-maven-plugin</artifactId>
  4. </plugin>

原因是添加该插件后编译打包时会自动寻找项目中的启动类,如果某个模块没有启动类或者有多个main启动类就会报错, 通过保证模块启动类main启动类入口唯一也可以解决。

发表评论

表情:
评论列表 (有 0 条评论,26人围观)

还没有评论,来说两句吧...

相关阅读