badges / badges/shields

Badge Shows Incorrect Snapshot Version on Nexus 3 Repositories

Open
#6,129 8 comments 1 reaction 1 assignee Claimed by @PyvesB View on GitHub
needs-upstream-help service-badge
Dominant language
JavaScript
Stars
27.2k
Forks
5.6k
Avg merge
1d 8h
Merged PRs (30d)
46

Description

Are you experiencing an issue with...

- [x] [shields.io](https://shields.io/#/)
- [ ] My own instance
- [ ] [badge-maker NPM package](https://www.npmjs.com/package/badge-maker)

:beetle: **Description**

Submitting this issue as per @PyvesB's request on Discord.

The badge below is a badge for one of my personal projects hosted on [my Sonatype OSS snapshots repository](https://repo.magicmq.dev/repository/maven-snapshots/). My repository is running OSS 3.28.0-1. The badge appears to show an incorrect timestamped version string for snapshot versions. The badge should show something along the lines of `0..0-SNAPSHOT` (because I am actively working on this project, I cannot tell you exactly what version number you should see). Release versions on my [releases repository](https://repo.magicmq.dev/repository/maven-releases/) show the correct version string on the badge. I did some troubleshooting on my own, and found that appending a ?nexusVersion=3 query parameter does not seem to help. I also found that [this](https://repo.magicmq.dev/service/rest/v1/search?group=dev.magicmq&name=itemapi&sort=version&prerelease=true) query returns a version consistent with the one on the badge, so my Nexus server seems to be returning results consistent with what is being shown.

Maven deploys snapshot artifacts with a timestamp so that successive artifacts can be appropriately tracked and stored (without replacing older ones). Regardless, the version that Nexus shows should not be these timestamped versions, but rather the actual version string (`0..0-SNAPSHOT` in my case).

I initially suspected this was a Nexus 3 issue because I troubleshooted with another Nexus 3 repository (not my own) and, like my own repository, snapshot versions were not showing the correct version string. Nexus 2 repositories also show the correct snapshot version, such as this one: https://img.shields.io/nexus/s/org.spongepowered/configurate-core?label=dev&server=https%3A%2F%2Foss.sonatype.org, leading me to believe that this issue is Nexus 3 specific.

:link: The badge in question: https://img.shields.io/nexus/s/dev.magicmq/itemapi?server=https%3A%2F%2Frepo.magicmq.dev

:bulb: **Possible Solution**

I haven't found any possible solution for this issue yet.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.