Nikolay
Nikolay

Reputation: 1121

maven SNAPSHOT vs BUILD-SNAPSHOT

I thought that my question is too simple for google to answer but...

I am used with the following maven versioning:

1.0.0 (Release)

1.0.0-SNAPSHOT (Snapshot)

now i see:

1.0.0-RELEASE (Release)

1.0.0-BUILD-SNAPSHOT (Snapshot)

I can't understand if the second is a new way to mark releases and snapshots or it is with completely different purpose?

Upvotes: 2

Views: 905

Answers (1)

Menno
Menno

Reputation: 97

What you are seeing is Spring project versioning. Spring has strict release type semantics. And alphabetical ordering is important, which explains the second new way that you mention in your question.

Notice that the following sequence of versions is in ordered ascending both alphabetically and toward GA:

1.0.0.BUILD-SNAPSHOT
1.0.0.M1
1.0.0.RC1
1.0.0.RELEASE

This is intentional. In OSGi use cases, bundle versions have precedence based on their alphanumeric ordering. This explains, for instance, why Spring versions do not use Maven-conventional 1.0.0.SNAPSHOT naming. It would order alphanumerically after 1.0.0.RELEASE!

Quoted from https://github.com/spring-projects/spring-build-gradle/wiki/Spring-project-versioning which contains more details if you are interested.

Upvotes: 1

Related Questions