rules_jvm_external
rules_jvm_external copied to clipboard
@maven//:outdated and alpha/rc artifacts
Running @maven//:outdated
(which is otherwise quite amazing) gets a bit noisy when some artefacts in use have pre-release versions. For example:
androidx.annotation:annotation [1.1.0 -> 1.2.0-alpha01]
I don't know if there's anything exposed through Maven directly to detect pre-releases, but it would be great to be able to skip them if the current version is not a pre-release.
This would probably mean parsing the version strings directly since nothing on the ComparableVersion class exposes information about the version string.
Maybe an ok way to get there would be to start from the end of the version list e.g. https://maven.google.com/androidx/annotation/annotation/maven-metadata.xml and use the first version that doesn't have "alpha", "beta", "rc", "milestone", or "snapshot" in the version string?
It might be interesting to have a slightly more involved logic and check the current version for those well-known qualifiers as well. For example, if the currently in use version has the rc
qualifier, then consider rc
artifacts (or more stable - it sounds from this documentation page that the well-known qualifier also have an established order). This would make this feature more useful overall, I think, but is definitely a trade-off in complexity.