0

I'm in the process of implementing CD with Maven and Jenkins and was just wondering:

Instead of Maven's major.minor.version scheme for the version, why not just use Jenkins build number?

That way the whole versioning could be fully automated, right?

helpermethod
  • 59,493
  • 71
  • 188
  • 276
  • Some people like to have meaningful ("semantic") version numbers. – Thilo Jun 30 '16 at 10:44
  • Related: http://stackoverflow.com/questions/18456111/what-is-the-maven-way-for-automatic-project-versions-when-doing-continuous-deliv?rq=1 – Thilo Jun 30 '16 at 10:45
  • @Thilo In general I agree but for in-house usage we don't really care about semantic versioning. – helpermethod Jun 30 '16 at 11:58
  • So Instead of maintaining two version pattern, I would prefer consistent versioning. I have 2 configuration in my jenkins as 1. Production with 3 version and 2. In-house version .. And everything is automated. – Anni S Jun 30 '16 at 12:26
  • Where is the real problem here? If you don't care about best practice you can of course use your version schema you prefer...Apart from that Maven's version schema is only best practice you can of course use things like `major.minor.version.patch.sublevel` etc. ? – khmarbaise Jul 01 '16 at 17:06

1 Answers1

1

You could do so... However, all platform have some recommended versioning system that you should follow such as

MacOS have 3 digit versioning system
Windows have 4 digit versioning.

You can easily achieve it, just write shell script to modify it in your jenkins build configuration.

major.minor.<you can have jenkins build number>
Anni S
  • 1,996
  • 19
  • 28