I recently tried to create a new deployment for my project on Maven Central, but the deployment has failed. The reason given is that one component validation has failed, with the following note:
pkg:maven/com.github.stefvanschie.inventoryframework/IF@0.11.4:
- Dependencies to SNAPSHOT versions not allowed for dependency: org.spigotmc:spigot-api
The error seems to point to the following dependency declaration in my pom.xml:
I do not understand what the issue is here. I also made a deployment for the same project two months ago, which also included this dependency (same groupId, artifactId, version, scope, and exclusions), but this deployment passed without any issues. Any help regarding this would be much appreciated.
This is a Maven validation error (i.e. not related to Nexus).
Nevertheless, basically, when deploying a release version (i.e a version without the “-SNAPSHOT” suffix) to a remote repository, Maven does not allow building with dependencies having “-SNAPSHOT” suffix.
Make sure you are using a release version for ALL dependencies in such a scenario.
Thank you both for the reply. I have also reached out to central support directly. As for the inability to deploy releases with snapshot dependencies, was this a recent change? I was able to publish a release with the same dependency, with the same snapshot version, two months ago. I looked around if there was any information on such a change, but I came up blank. Secondly, is it possible for me to change this restriction? Unfortunately, the dependency I am using only provides snapshots and not releases, so I cannot switch the dependency version to anything else.
I received a reply to my e-mail that confirms this was indeed a recent change in their validation, so that is useful to know. Thank you both for your swift replies in helping me with this issue.