[ 
http://jira.codehaus.org/browse/MVERSIONS-77?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=194362#action_194362
 ] 

Stephen Connolly commented on MVERSIONS-77:
-------------------------------------------

The reality is that the Maven3 comparison rule does not sort artifacts in the 
same order as the Maven2 rule.

Mercury's comparison rule does not match the OSGi rules (i.e. OSGi says any 
qualifier (including -SNAPSHOT) is newer than no qualifier)

Some artifacts which have been released with version numbers conforming to the 
"sort order" of maven2 will have issues when compared using the Mercury 
comparison rules.  Changing the comparison rules is not a trivial task and will 
have side-effects... this does get discussed every so often on the d...@maven 
list, but AFAIK, it is not the #1 priority for the current effort on 3.x... 
mostly the justification given is that most people are not using version 
ranges, and the comparison method only comes into its own when you use version 
ranges.

e.g.

[5.0.0.0,5.0.1.0) will work as long as you always use 4 digit version numbers 
and have no more than 9 versions in the range... if you look like going past 9, 
there are ways around, such as

5.0.0.0
5.0.0.1
5.0.0.2
5.0.0.3
5.0.0.4
5.0.0.50 [looks like we're getting close to 9]
5.0.0.51
5.0.0.52 etc

but these ranges will never be satisfied by 5.0.0 as 0.0.1 > 5.0.0.0 under 
maven 2

The only areas where switching a comparison rule is "safe" is where the old and 
the new rules overlap.

The reason I went with a completely separate XML file is _because_ in an 
organization, you will have one rule on version comparison.  you set up that 
file, and every build thereafter uses it.

You can quite easily deploy your rules file to your maven repository, so if you 
are using maven, it's trivial to host a rules file, and you really should only 
ever have one rules file.  Ideally what I would like to see is a comparison 
rule provided in the maven-metadata.xml files... but I need to get a discussion 
going about that on the maven list... and people have been too distracted with 
the "clean up the metadata, let's host a new central" debate

> Support for configuring global comparisonMethod without requiring creation of 
> rule-set xml
> ------------------------------------------------------------------------------------------
>
>                 Key: MVERSIONS-77
>                 URL: http://jira.codehaus.org/browse/MVERSIONS-77
>             Project: Maven 2.x Versions Plugin
>          Issue Type: Wish
>    Affects Versions: 1.0
>            Reporter: Stevo Slavic
>            Priority: Minor
>
> Please support configuring global comparisonMethod, so that one isn't 
> required to create and configure custom rule-set xml if a common version 
> number scheme should be used for all artifacts version comparisons. This 
> could be implemented as additional parameter to every plugin mojo (like 
> rulesUri), defaulting to "maven". If reference to rule-set xml is configured 
> via rulesUri along with new global comparisonMethod param, then any value 
> configured as comparisonMethod attribute of ruleset should override global 
> comparisonMethod.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

    http://xircles.codehaus.org/manage_email


Reply via email to