[
https://issues.apache.org/jira/browse/MRESOLVER-578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17871053#comment-17871053
]
Tamas Cservenak commented on MRESOLVER-578:
-------------------------------------------
Related comment
https://github.com/apache/maven-resolver/pull/406/files#r1453502911
> Incorrect qualifier handling in `GenericVersionScheme`
> ------------------------------------------------------
>
> Key: MRESOLVER-578
> URL: https://issues.apache.org/jira/browse/MRESOLVER-578
> Project: Maven Resolver
> Issue Type: Bug
> Affects Versions: 2.0.0
> Reporter: David M. Lloyd
> Priority: Major
>
> Starting with version 2.0.0, the resolver no longer considers the qualifier
> `ga` to be equal to `0` in some circumstances.
> In 1.9.6, we have this output:
> ```
> $ jbang --main=org.eclipse.aether.util.version.GenericVersionScheme
> org.apache.maven.resolver:maven-resolver-util:1.9.6 0 ga
> Display parameters as parsed by Maven Resolver (in canonical form and as a
> list of tokens) and comparison result:
> 1. 0 -> 0; tokens: [0]
> 0 == ga
> 2. ga -> ga; tokens: [0]
> ```
> Whereas in 2.0.0 we have this:
> ```
> $ jbang --main=org.eclipse.aether.util.version.GenericVersionScheme
> org.apache.maven.resolver:maven-resolver-util:2.0.0 0 ga
> Display parameters as parsed by Maven Resolver 'generic' scheme (in canonical
> form and as a list of tokens) and comparison result:
> 1. 0 -> 0; tokens: [0]
> 0 > ga
> 2. ga -> ga; tokens: [0]
> ```
> While this is a major version change, and incompatibilities are to be
> expected, I think this should be evaluated as a possible bug. In trailing
> context, a zero segment such as `ga` or `0` is considered equal to any other
> zero segment. When a series of tokens is given, such as `0.0.ga`, it's not
> entirely clear what is leading and what is trailing context. I think it is
> reasonable to expect that `0.0.ga` == `0` == `ga` == the empty string, and
> thus "trailing context" should in this case be defined to include any number
> of trailing zero segments, even if there are no nonzero leading segments.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)