进行持续交付时,自动项目版本的 Maven 方式是什么? [英] What is the Maven way for automatic project versions when doing continuous delivery?

查看:36
本文介绍了进行持续交付时,自动项目版本的 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:

关键点是每个构建都是一个潜在的版本,所以不要使用快照.

The key takeaway is each build is a potential release, so don't use snapshots.

这篇关于进行持续交付时,自动项目版本的 Maven 方式是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆