shields icon indicating copy to clipboard operation
shields copied to clipboard

Pre-release filter for Maven Central

Open chrisbanes opened this issue 1 year ago • 2 comments

Similar to the Nuget vpre variant, I'd love a way to filter for stable or pre-releases on Maven Central. Currently it will always display the latest version.

I could use versionPrefix but then I have to update the version each release.

chrisbanes avatar Jul 16 '24 08:07 chrisbanes

I think the reason we haven't attempted to implement this for maven is that the response we get from maven central (example: https://repo1.maven.org/maven2/com/google/guava/guava/maven-metadata.xml ) don't allow us to know if a given version is classed as a pre-release by the registry or not. I also suspect that not every project on maven central follows the exact same rules for how a version string would communicate that a release is a pre-release.

chris48s avatar Jul 22 '24 09:07 chris48s

You could implement a best-effort regex filter for the most-used pre-release patterns. It won't catch everything, but it should work for 95% of the cases.

  • /-(rc|m)-?\d+/i

leonard84 avatar Apr 22 '25 08:04 leonard84