0

Your application has a maven snapshot of 2.0.1 and you add code to it that you want to deploy:

A)Increase the snapshot to differentiate between the temp version 2.0.1 and 2.0.2 and deploy the latest snapshot 2.0.2

B)Deploy the latest snapshot 2.0.1

If you do a snapshot build (build 2.0.2 (A) or 2.0.1 (B)), does this means that both builds have the latest code? The only difference is that with the first option you add a secondary second version (2.0.1). Is that correct?

Vincent
  • 6,058
  • 15
  • 52
  • 94
  • I don't follow your question. Are you asking if there is something wrong with incrementing a minor version to your snapshot after making a small change of code? – Tim Biegeleisen May 02 '18 at 11:13
  • I want to know that when you increase the snapshot to 2.0.2 and build the latest snapshot, you have the same code in there as when you wouldn't increase the snapshot version and build the latest snapshot. So you only added an extra rollback version when you add the snapshot version. – Vincent May 02 '18 at 11:17
  • I'm not an expert in this, but I would say that if the version numbers differ, it should be assumed that the code also differs, to some degree. – Tim Biegeleisen May 02 '18 at 11:18

1 Answers1

1

The code of an artifact is independent of the version number. When you build the artifact, you get an artifact with the latest code, may the version number be 2.0.1-SNAPSHOT, 2.0.2-SNAPSHOT, 2.3-somesuffix, 1.2.4-17, ...

J Fabian Meier
  • 33,516
  • 10
  • 64
  • 142