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

查看:289
本文介绍了在进行连续交付时,自动项目版本的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 一年多。
我想知道什么是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使用的最佳实践?

问题实际上是两个:


  • 在个人 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:

  • You tube presentation on CD with Maven
  • Slides

关键是每个版本都是潜在的版本,所以使用Maven版本插件,不使用快照。

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

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

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