What is the Maven way for automatic project versions when doing continuous delivery?

ams picture ams · Aug 27, 2013 · Viewed 40.4k times · Source

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.

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.

What is the recommend best practice for this type of Maven usage?

The problem is actually a two-fold one:

  • 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.

Answer

Mark O'Connor picture Mark O'Connor · Aug 27, 2013

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.