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 个月前 )
8f63dcca
Maven now fails with a clear error message when a POM contains mixins
but consumer POM flattening is disabled. Mixins require model version 4.2.0
and cannot be part of the consumer POM, so they must be removed during
transformation through flattening.
Changes:
- Added validation in DefaultConsumerPomBuilder to check for mixins when
flattening is disabled and throw MavenException with helpful message
- Added integration test MavenITgh11456MixinsConsumerPomTest with three scenarios
The error message guides users to either enable flattening by setting
maven.consumer.pom.flatten=true, using preserve.model.version=true, or remove mixins from their POM.
Fixes https://github.com/apache/maven/issues/11456
1 天前
dff79033
Bumps [net.bytebuddy:byte-buddy](https://github.com/raphw/byte-buddy) from 1.18.1 to 1.18.2.
- [Release notes](https://github.com/raphw/byte-buddy/releases)
- [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md)
- [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.18.1...byte-buddy-1.18.2)
---
updated-dependencies:
- dependency-name: net.bytebuddy:byte-buddy
dependency-version: 1.18.2
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 1 天前
AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。
更多推荐


所有评论(0)