sách gpt4 ai đã đi

Maven 发布 :branch

In lại 作者:行者123 更新时间:2023-12-04 21:49:24 33 4
mua khóa gpt4 Nike

我有一个 Maven 多模块项目。

当代码开发完成后,我们想在 Jenkins 中编写一个分支构建作业,它分支代码,增加主干中的 pom 版本,并删除
-SNAPSHOT 来自分支中的 pom 版本。

所以,如果主干是 2.2-SNAPSHOT,到操作结束时,主干应该是 2.3-SNAPSHOT,并且新创建的分支应该有 2.2 的 poms。

当我使用 release:branch 时,主干正在更新,但它没有从分支中的 pom 中删除 -SNAPSHOT。

如果您有任何实现这一目标的想法,请告诉我。

Cảm ơn trước.

1 Câu trả lời

Từ Maven Release plugin: Create a branch

By default, the POM in the new branch keeps the same version as the local working copy, and the local POM is incremented to the next revision. If you want to update versions in the new branch and not in the working copy, run:

mvn release:branch -DbranchName=my-branch -DupdateBranchVersions=true -DupdateWorkingCopyVersions=false

Note: This can be useful if you want to create a branch from a tag


作为替代方案,您可能想尝试 Versions Maven plugin :

mvn versions:set versions:commit -DnewVersion=2.2.0


您仍然需要手动创建分支...

关于Maven 发布 :branch,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7686889/

33 4 0
行者123
Hồ sơ cá nhân

Tôi là một lập trình viên xuất sắc, rất giỏi!

Nhận phiếu giảm giá Didi Taxi miễn phí
Mã giảm giá Didi Taxi
Giấy chứng nhận ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com