Execution default of goal org.springframework.boot:spring-boot-maven-plugin: XXXX .RELEASE:repackage
maven
Maven: Apache Maven是一个开源的项目管理和构建工具,主要用于Java项目。适合需要自动化项目构建和依赖管理的开发者。特点包括约定优于配置、易于使用和社区驱动。
项目地址:https://gitcode.com/gh_mirrors/ma/maven
·
Spring boot 执行打包操作时候,报错如下
Execution default of goal org.springframework.boot:spring-boot-maven-plugin:XXXX RELEASE:repackage failed: Unable to find main class
根源为,在我的项目场景下,
只有如图的-boot子模块生产可执行JAR包,其他几个模块是不需要可执行的,而我的根POM里,spring boot 默认帮我加入了如下build策略
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
解决方案比较简单,就是把这个spirng boot针对所有模块的build部分移除出来,放到你自己需要打包的那个子模块里,我这里是api-service-boot模块,其他模块不需要生产可执行的jar.
Maven: Apache Maven是一个开源的项目管理和构建工具,主要用于Java项目。适合需要自动化项目构建和依赖管理的开发者。特点包括约定优于配置、易于使用和社区驱动。
最近提交(Master分支:1 个月前 )
d5076b7d
Fixes to master re ITs:
* missing `.mvn` folder and parent from local repo
* rename dangling IT that seems never to run 1 天前
d213b586
This PR introduces a new feature flag maven.consumer.pom.flatten that allows users to control whether consumer POMs are flattened by removing dependency management sections. This addresses dependency management inheritance scenarios and provides better control over consumer POM generation.
The consumer POM are NOT flattened anymore by default.
Fixes #11346 2 天前
新一代开源开发者平台 GitCode,通过集成代码托管服务、代码仓库以及可信赖的开源组件库,让开发者可以在云端进行代码托管和开发。旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。
更多推荐


所有评论(0)