[ https://issues.apache.org/jira/browse/MRESOLVER-334?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17694616#comment-17694616 ]
David M. Lloyd commented on MRESOLVER-334: ------------------------------------------ Additionally, there is a provision in the specification which says that "if the prefix is the same.... '{{.qualifier}}' {{=}} '{{-qualifier}}' {{<}} '{{-number}}' {{<}} '{{.number}}'". However, I was not able to produce an example that showed the ordering "{{-number}}" {{<}} "{{.number}}". > Maven Resolver's GenericVersionScheme diverges from the spec > ------------------------------------------------------------ > > Key: MRESOLVER-334 > URL: https://issues.apache.org/jira/browse/MRESOLVER-334 > Project: Maven Resolver > Issue Type: Bug > Components: Resolver > Affects Versions: 1.9.5 > Reporter: David M. Lloyd > Priority: Major > > The [specification for version > resolution|https://maven.apache.org/pom.html#version-order-specification] > indicates these two facts which disagree with the implementation in > {{GenericVersionScheme}}: > * "The Maven coordinate is split in tokens between dots ('{{.}}'), hyphens > ('{{-}}') and transitions between digits and characters." - in > {{GenericVersion}}, the underscore ('{{_}}') is also treated as a separator. > * In the examples area, it says that while "{{1-sp.1}}" {{>}} "{{1-ga.1}}", > at the same time "{{1-sp-1}}" {{<}} "{{1-ga-1}}" {{=}} "{{1-1}}" due to > "trailing 'null' values at each hyphen". But in addition to being untrue in > the actual implementation, this relation is clearly nonsensical because it > would place {{sp}} before {{ga}}, which would have a tremendous negative > impact on the existing artifact ecosystem if it were carried out in the > implementation. > * Also in the example area, we have "{{1.foo}}" {{=}} "{{1-foo}}" {{<}} > "{{1-1}}" {{<}} "{{1.1}}", whereas in practice it is (rightly) "{{1.foo}}" > {{=}} "{{1-foo}}" {{<}} "{{1-1}}" {{=}} "{{1.1}}". > In my opinion all of these things are spec errors so I'd be happy to see the > spec page be updated and this bug consequently closed as "out of date", > especially since the implementation behavior has been in the wild for some > time. -- This message was sent by Atlassian Jira (v8.20.10#820010)