[sonar-dev] Sonar Plugin versioning differs from maven

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[sonar-dev] Sonar Plugin versioning differs from maven

Andreas Kohn
Hi,

I'm forced to use a fork of the sonar pitest plugin[1], and I created a local release with version "0.5-mycompany-1". This versioning scheme works with maven-based forks, and ensures that maven considers the fork newer than the version I forked from, but older than any upcoming upstream version. 

When I looked at my sonar 'plugin updates' page however I noticed that sonar considers the upstream version 0.5 to be newer than my fork. 

You can easily try out maven's rules by compiling the attached tool against maven-artifact (I used 3.2.2), and invoking it like this:

$ java -cp ~/.m2/repository/org/apache/maven/maven-artifact/3.2.2/maven-artifact-3.2.2.jar:. CompareVersions 0.5 0.5-mycompany-1 0.5.1
0.5 < 0.5-mycompany-1 < 0.5.1

Was there any specific reason for this difference (as sonar does use maven for the plugins), and, could you fix it please? :)

Regards,
--
Andreas



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

CompareVersions.java (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [sonar-dev] Sonar Plugin versioning differs from maven

Simon Brandhof
Hi Andreas,

SonarQube update center does not rely on Maven to compare versions. Having 0.5-something pattern never occurs in our production update center.
Ticket is created: https://jira.codehaus.org/browse/SONAR-6268. Meanwhile you should use naming "0.5.0.mycompany1" to make it work.

Regards


Simon BRANDHOF | SonarSource
Tech Lead & Co-Founder
http://twitter.com/SimonBrandhof

On 9 March 2015 at 17:39, Andreas Kohn <[hidden email]> wrote:
Hi,

I'm forced to use a fork of the sonar pitest plugin[1], and I created a local release with version "0.5-mycompany-1". This versioning scheme works with maven-based forks, and ensures that maven considers the fork newer than the version I forked from, but older than any upcoming upstream version. 

When I looked at my sonar 'plugin updates' page however I noticed that sonar considers the upstream version 0.5 to be newer than my fork. 

You can easily try out maven's rules by compiling the attached tool against maven-artifact (I used 3.2.2), and invoking it like this:

$ java -cp ~/.m2/repository/org/apache/maven/maven-artifact/3.2.2/maven-artifact-3.2.2.jar:. CompareVersions 0.5 0.5-mycompany-1 0.5.1
0.5 < 0.5-mycompany-1 < 0.5.1

Was there any specific reason for this difference (as sonar does use maven for the plugins), and, could you fix it please? :)

Regards,
--
Andreas



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email