-1

Experientally Ive seen "leading" snapshots, where point releases are named "in step" with the next realease, for example:

2.0
3.0-SNAPSHOT-... (point release)
3.0-SNAPSHOT-... (point release)
3.0 (First actual release of 3.0) 
...

However, I know that other organizations use lagging snapshots.

2.0
2.0.1-SNAPSHOT-... (point release)
2.0.2-SNAPSHOT-... (point release)
3.0
...

Has a convention been defined in the broader community regarding wether to do leading or lagging snapshots with maven, and if so where? What are the consequences of lagging snapshots, if any... (other than violating maven convention).

jayunit100
  • 17,388
  • 22
  • 92
  • 167

2 Answers2

0

Following the best practice is a wise way like this

If you need releases in between you should name them like RC1, RC2(Release Candidate) etc. Than the naming schema looks like this:

2.0
3.0-SNAPSHOT
3.0-RC1
3.0-RC2-SNAPSHOT
3.0-RC2
3.0-RC3-SNAPSHOT
3.0

and will fit in the maven conventions and can use tools like Nexus/Artifactory/Archiva to let them wipe out SNAPSHOT versions. From maven point of view 3.0-RC1 is a release where as 3.0-RC2-SNAPSHOT is of course a SNAPSHOT.

Community
  • 1
  • 1
khmarbaise
  • 92,914
  • 28
  • 189
  • 235
0

Jay,

You should stick with the standard practice of using leading notation. This is not just for you, but for the benefit of anyone you may end up collaborating with somewhere down the line.

Let's say you refactor out a portion of your code into a standalone library jar. A collaborator wants to use this jar, compiling against the latest snapshots from your nightly build to pick up your latest experimental features. If you use lagging notation, their Maven engine will fail to pick up your latest snapshot, and instead pick up the previous release.

One other note is that Maven does have built-in qualifiers like alpha or beta, not just SNAPSHOT. These Oracle docs give a pretty good explanation.

333kenshin
  • 1,995
  • 12
  • 17