What is the Maven way for automatic project versions when doing continuous delivery?(进行持续交付时,自动项目版本的 Maven 方式是什么?)
问题描述
我有一个 Web 应用程序,只要功能准备就绪,我们就会将其部署到生产环境中,有时可能是一天几次,有时可能是发布之间的几周.
I have a web application where we deploy to production whenever a feature is ready, sometimes that can be a couple of times a day, sometimes it can be a couple of weeks between releases.
目前,我们不会为我们的项目增加版本号,并且所有内容都在版本 0.0.1-SNAPSHOT
上运行了一年多.我想知道为 Web 应用程序进行持续交付的 Maven 方式是什么.每次提交都增加版本号似乎有点过头了,而且永远不要像我们现在做的那样增加版本号,这似乎也是错误的.
Currently, we don't increment our version numbers for our project, and everything has been sitting at version 0.0.1-SNAPSHOT
for well over a year.
I am wondering what is the Maven way for doing continuous delivery for a web apps. It seems overkill to bump up the version number on every commit, and never bumping the version number like we are doing now, also seems wrong.
对于这种类型的 Maven 使用,推荐的最佳做法是什么?
这个问题其实有两个方面:
The problem is actually a two-fold one:
- 在单个
pom.xml
文件中推进项目版本号(可以有很多). - 更新所有依赖组件中的版本号以使用彼此的最新版本.
- Advancing project version number in individual
pom.xml
file (and there can be many). - Updating version number in all dependent components to use latest ones of each other.
推荐答案
我推荐以下演示文稿,讨论使用 Maven 进行持续交付的实际现实:
I recommend the following presentation that discusses the practical realities of doing continuous delivery with Maven:
- 您使用 Maven 在 CD 上进行电子管演示
- 幻灯片
关键点是每个构建都是一个潜在的版本,所以不要使用快照.
The key takeaway is each build is a potential release, so don't use snapshots.
这篇关于进行持续交付时,自动项目版本的 Maven 方式是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:进行持续交付时,自动项目版本的 Maven 方式是什


- GC_FOR_ALLOC 是否更“严重"?在调查内存使用情况时? 2022-01-01
- Eclipse 的最佳 XML 编辑器 2022-01-01
- 将 Java Swing 桌面应用程序国际化的最佳实践是什么? 2022-01-01
- java.lang.IllegalStateException:Bean 名称“类别"的 BindingResult 和普通目标对象都不能用作请求属性 2022-01-01
- 获取数字的最后一位 2022-01-01
- 如何使 JFrame 背景和 JPanel 透明且仅显示图像 2022-01-01
- 转换 ldap 日期 2022-01-01
- 未找到/usr/local/lib 中的库 2022-01-01
- 如何指定 CORS 的响应标头? 2022-01-01
- 在 Java 中,如何将 String 转换为 char 或将 char 转换 2022-01-01