Sign in
Sign up
Explore
Enterprise
Education
Search
Help
Terms of use
About Us
Explore
Enterprise
Education
Gitee Premium
Gitee AI
AI teammates
Sign in
Sign up
Fetch the repository succeeded.
Open Source
>
Development Tools
>
Wiki/Document
&&
Donate
Please sign in before you donate.
Cancel
Sign in
Scan WeChat QR to Pay
Cancel
Complete
Prompt
Switch to Alipay.
OK
Cancel
Watch
Unwatch
Watching
Releases Only
Ignoring
207
Star
1.9K
Fork
652
tanghc
/
torna
Code
Issues
67
Pull Requests
1
Wiki
Insights
Pipelines
Service
JavaDoc
Quality Analysis
Jenkins for Gitee
Tencent CloudBase
Tencent Cloud Serverless
悬镜安全
Aliyun SAE
Codeblitz
SBOM
Don’t show this again
84
fix: root-pom 添加 flatten-maven-plugin , 确保模块构建后的制品可以单独使用.
Merged
張馬也爷:develop
tanghc:develop
張馬也爷
create on 2025-04-14 18:28
Clone/Download
HTTPS
SSH
Copy
Email Patch
Diff file
fix: root-pom 添加 flatten-maven-plugin , 确保模块构建后的制品可以单独使用. ## 原因: 1. 现有构建信息会原样保留到制品中,如 `cn.torna:server-service` 制品 jar 包中的parent-version 仍为 `${reversion}`,这会导致没法单独使用某个模块的制品。 2. 在 `flatten-maven-plugin` [官方首页](https://www.mojohaus.org/flatten-maven-plugin/index.html)就介绍了主要作用: >The Flatten Maven Plugin generates a flattened version of the pom.xml that Maven installs and deploys instead of the original. The flattened POM has the following characteristics: 展平 Maven 插件会生成 Maven 安装和部署的 pom.xml 的展平版本,而不是原始版本。平整后的 POM 具有以下特性: >... >- Development specific elements are removed by default 默认情况下,将删除特定于开发的元素 >- It only contains elements required for users of your artifact 它仅包含构件用户所需的元素 >- Its variables are resolved 其变量已解析 >- Its parent relationship is resolved, flattened and removed 其父关系被解析、展平和删除 >... >- You can keep the versions of parent POMs fixed and use them for development only distributed via version control only instead of maven repositories. This way you can use centralized variables and dependencyManagement without maintaining and releasing parent POM versions. 您可以保持父 POM 的版本固定,并仅通过版本控制而不是 maven 存储库分发它们用于开发。这样,您就可以使用集中式变量和 dependencyManagement,而无需维护和发布父 POM 版本。 ## 关于 flattenMode 使用 `resolveCiFriendliesOnly` 具体描述可见[官方文档](https://www.mojohaus.org/flatten-maven-plugin/flatten-mojo.html#flattenMode),因为项目的 root-parent 是 spring-boot-starter-parent ,所以若选择开源软件推荐的 `oss` 会附带上 spring 中 url 等有误导性的信息 ,决定使用最少可用的 `resolveCiFriendliesOnly` 保证 `revision`解析没问题。 [官方样例可看](https://www.mojohaus.org/flatten-maven-plugin/examples/example-multiple-versions.html)
This pull request needs to pass some approval items
Type
Assign personnel
Status
Reviewer
tanghc
Pass review
Completed
(1/1 )
Tester
tanghc
Pass test
Completed
(1/1 )
How to merge Pull Request
git checkout develop
git pull https://gitee.com/zchazc/torna.git develop
git push origin develop
Comments
2
Commits
1
Files
1
Checks
Code problems
0
Bulk operation
Expand
Collapse
Reviewer
Code Owner
Reviewer
上官胡闹
devin-alan
布衣
xiaohang_huang
15319109070
san-gong-zi
年轻
bing_chao
cqmike
cqmike
tanghc
durcframework
No Setting
Min number
1
Tester
上官胡闹
devin-alan
布衣
xiaohang_huang
15319109070
san-gong-zi
年轻
bing_chao
cqmike
cqmike
tanghc
durcframework
No Setting
Min number
1
Priority
Not specified
Serious
Main
Secondary
Unimportant
Label
Label settings
No Setting
Link Issue
No link issue
Successfully merged pull requests will close issues
Milestone
No related milestones
Participators
(1)
Java
1
https://gitee.com/durcframework/torna.git
git@gitee.com:durcframework/torna.git
durcframework
torna
torna
Going to Help Center
Search
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register