image.png
提示401:Received status code 401 from server: Unauthorized

1、可能是 账号密码错误或者未完全授权

验证: https://s01.oss.sonatype.org/#welcome ,能正确登录则证明没有问题,如无法正确登录,需检查账号密码正确性,如在 https://issues.sonatype.org/login.jsp?os_destination=%2Fprojects%2FNEXUS 此网址可正常登录,但不能在 https://s01.oss.sonatype.org/#welcome 登录,需参考https://blog.csdn.net/qq_30234677/article/details/118728120 中创建issues.

2、发布地址与版本号不匹配(仅限首次发布) 例如

发布地址为正式包发布地址:https://s01.oss.sonatype.org/content/repositories/releases/

版本号为 0.0.1-snapshot

提示403:Received status code 403 from server: Forbidden

可能是因为group id不正确
image.png

修改域名为申请Maven 时填写的域名。

groupid 申请规则请参考 https://central.sonatype.org/publish/requirements/coordinates/

例:
image.png

提示400:Received status code 400 from server: Bad Request

可能是想要上传的版本号在Maven仓库中已存在了

在此网址中查找组件对应版本: https://s01.oss.sonatype.org/#nexus-search;quick~maventest

之后升级小版本即可。

image.png