Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven artifact version for patches

I'm currently working on Maven tools for Project Dash. One of the open issues is how to handle mistakes.

Maven central says: Nothing published ever changes. This is because Maven never tries to figure out whether a release has changed (unlike for SNAPSHOTs).

But I might have to create a new "release" of, say, part of Eclipse 3.6.2. Which version number should I use? 3.6.2.1, 3.6.2-1, 3.6.2_1, 3.6.2pl1? Why?

like image 749
Aaron Digulla Avatar asked Mar 18 '11 13:03

Aaron Digulla


People also ask

What does rc1 mean Maven?

RC means Release Candidate. A milestone means that the application got a huge improvement from the todo list. A release candidate is a release that can be the final release unless some major bugs are found.

Is it possible for Maven to pull automatically the latest version?

Maven Dependency Updating Using the CLIThe Versions Maven Plugin is a Maven Plugin that can be used to automatically scan pom. xml dependencies and look up new versions.

What is release version in Maven?

1 Version Numbers in Maven Coordinates. The version number of the artifact defined in the POM file is the same as the version number of the released product, for example 12.1. 2.0.


2 Answers

The convention for version numbers is major.minor.build.

major is incremented when the public interface changes incompatibly. For example, a method is removed, or its signature changes. Clients using your library need to take care when using a library with a different major version, because things may break.

minor is incremented when the public interface changes in a compatible way. For example, a method is added. Clients do not need to worry about about using the new version, as all the functions they are used to seeing will still be there and act the same.

build is incremented when the implementation of a function changes, but no signatures are added or removed. For example, you found a bug and fixed it. Clients should probably update to the new version, but if it doesn't work because they depended on the broken behavior, they can easily downgrade.

The tricky issue here is that it sounds like you are modifying code written and released by somebody else. The convention here, as I have seen it, is to postfix the version number with either -yourname-version or just -version. For example, linux-image-2.6.28-27 is a likely name of a Ubuntu kernel image.

As Maven uses dashes to differentiate between artifact coordinates, however, I would recommend (very long-windedly, apparently) to just add .version to avoid confusing it. So 3.6.2.1 in this case.

like image 197
Jonathan Avatar answered Sep 22 '22 13:09

Jonathan


Maven project versions are specified like this.

<major version>.<minor version>.<incremental version>-<qualifier>

As you do not want to change the version number you are looking for a qualifier. I do not know if there is a general recommendation for the name of the qualifier. The Spring people e.g. did something like this

2.5.6.SEC01
2.5.6.SR02
3.0.0.M3

They didn't use the hyphen/dash notation to seperate the qualifier.

What ever you do, you have to be careful regarding the ordering of versions! Have a look at the first link I added.

Update: Also have a look at @krzyk comment for recent changes/additions.

like image 34
FrVaBe Avatar answered Sep 23 '22 13:09

FrVaBe