SpringBoot项目运行正常打包报错[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin
错误信息: [ERROR] Failed to execute goal org.springframework.boot2.0.1.RELEASE:repackage (default) on project xc-framework-common: Execution default of goal org.springframework.boot
2.0.1.RELEASE:repackage failed:
解决方式:
去除如下插件可以解决:
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
原因是添加该插件后编译打包时会自动寻找项目中的启动类,如果某个模块没有启动类或者有多个main启动类就会报错, 通过保证模块启动类main启动类入口唯一也可以解决。
还没有评论,来说两句吧...