gnodet opened a new pull request, #13991:
URL: https://github.com/apache/maven/pull/13991
Backport of #12771 to `maven-4.0.x`.
`DefaultPluginVersionResolver.selectVersion()` on 4.0.x had no pre-release
awareness: it partitioned available versions only into RELEASE and SNAPSHOT
buckets, so a plugin whose latest 'release' metadata entry pointed at e.g.
`3.0.0-beta-2` would be selected even when `2.1.0` (a stable release)
existed.
## Changes
- Add `isPreRelease(version)` using `GenericQualifiers.qualifier()`
(available
since maven-resolver 2.0.21, already on 4.0.x at 2.0.25)
- Add `hasStableVersion(versions)` to detect whether a stable fallback exists
- Add `isParseable(version)` for the stable-version filter
- Add `selectCompatible(request, candidates, kind)` helper to deduplicate the
RELEASE/PRE-RELEASE/SNAPSHOT selection loop
- In `selectVersion()`, skip a pre-release RELEASE/LATEST metadata entry when
a stable version is available; partition the fallback search into three
buckets (RELEASE > PRE-RELEASE > SNAPSHOT)
- Add `DefaultPluginVersionResolverTest` covering all qualifier cases
Equivalent of merge commit 7dc59176c0b0cb09198bef11425b97ece582c606.
<!-- maven-backport-bot -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]