Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

snapshot版本号小写,导致被nexus私服识别为release库 #417

Open
dulio opened this issue Feb 22, 2024 · 3 comments
Open

snapshot版本号小写,导致被nexus私服识别为release库 #417

dulio opened this issue Feb 22, 2024 · 3 comments

Comments

@dulio
Copy link

dulio commented Feb 22, 2024

基本信息

  • ruoyi-vue-pro 版本:2.0.0
  • Nexus版本:OSS 3.30.1-01

snapshot版本号小写,导致被nexus私服识别为release库,无法redeploy

强制上传snapshot库时,被nexus私服Version policy拦截上传

你猜测可能的原因

版本号为2.0.0-jdk8-snapshot

nexus里的snapshot库Version policy配置了Snapshot。但是发现该判断无法识别小写snapshot,必须为标准的2.0.0-jdk8-SNAPSHOT才行

复现步骤

给maven配置一个nexus私服地址,snapshot和release库分别配置Version policy为Snapshot和Release

mvn clean deploy -Dmaven.test.skip=true -f pom.xml

报错信息

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:3.1.1:deploy (default-deploy) on project yudao: Failed to deploy artifacts: Could not transfer artifact cn.iocoder.boot:yudao:pom:2.0.0-jdk8-snapshot from/to nexus-snapshots (https://xxxx.xxx.com/repository/snapshot): status code: 400, reason phrase: Repository version policy: SNAPSHOT does not allow version: 2.0.0-jdk8-snapshot (400) -> [Help 1]

@Ziyear
Copy link

Ziyear commented Feb 26, 2024

@dulio
Copy link
Author

dulio commented Feb 26, 2024

https://community.sonatype.com/t/400-repository-version-policy-snapshot-does-not-allow-version-3-0-0/4053 不知道这个可不可以解决你的问题

感谢。我这边试过,发现我这个版本的nexus无法修改已有库的version policy,不知道新版nexus行不行;重建maven库的成本也很高,不太可行
大多数开源软件的SNAPSHOT都是大写,希望未来能在源点解决,这样问题会少一些

@YunaiV
Copy link
Owner

YunaiV commented Mar 9, 2024

我研究研究哈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants