New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maven Metadata not showing latest version #6188
Comments
Looks like maven central sorts the versions properly, whereas the Gradle plugins does not https://repo1.maven.org/maven2/com/parmet/buf-gradle-plugin/maven-metadata.xml |
Of course - I hadn't actually clicked through. Do we know which property should be trusted? Based on the metadata model I'd say we probably want |
It looks like the version order is not consistent, so the better approach would be sorting the versions. Here's how Maven sorts versions: gradle/gradle#11760 (comment) |
This is a little hacky, because the maven & plugin portal shields often don't report the correct version: badges/shields#6188 Instead, we use the Maven Central method, which should have the same version published as the Gradle Plugin Portal does.
This is a little hacky, because the maven & plugin portal shields often don't report the correct version: badges/shields#6188 Instead, we use the Maven Central method, which should have the same version published as the Gradle Plugin Portal does.
This is a little hacky, because the maven & plugin portal shields often don't report the correct version: badges/shields#6188 Instead, we use the Maven Central method, which should have the same version published as the Gradle Plugin Portal does.
Are you experiencing an issue with...
馃 Description
Badges generated from Maven metadata use the last element of the versions list which may not be the latest version. In this case the latest version is
0.0.12
, but the badge shows version0.0.9
.馃敆 Link to the badge
https://img.shields.io/maven-metadata/v/https/plugins.gradle.org/m2/com/parmet/buf-gradle-plugin/maven-metadata.xml.svg?label=gradle-portal&color=yellowgreen
馃挕 Possible Solution
Instead of taking the last element of the list, use the
metadata.version
ormetadata.versioning.latest
ormetadata.versioning.release
element: https://plugins.gradle.org/m2/com/parmet/buf-gradle-plugin/maven-metadata.xml.I'm actually not sure why the Maven Central badge is working - it seems to use a similar strategy.
https://img.shields.io/maven-central/v/com.parmet/buf-gradle-plugin
The text was updated successfully, but these errors were encountered: