简体   繁体   English

Maven依赖项快照版本号与nexus快照版本号相差1秒

[英]maven dependency snapshot version number is different from nexus snapshot version number by 1 second

We are using Maven as build manager and Nexus as our artifact repository. 我们正在使用Maven作为构建管理器,并使用Nexus作为我们的工件存储库。 From time to time we are having this dependency problem and Maven is not able to find the artifact in Nexus by a slight difference in the snapshot version number. 有时我们会遇到这种依赖性问题,由于快照版本号稍有不同,Maven无法在Nexus中找到工件。 In this case, the difference seems to be 1 second. 在这种情况下,差异似乎是1秒。

Currently, a build is failing, maven is looking for 目前,构建失败,Maven正在寻找

SOME_ARTIFACT-0.0.1-20181217.1153 18 -337.jar SOME_ARTIFACT-0.0.1-20181217.1153 18 -337.jar

but on the Nexus we have 但是在Nexus上

SOME_ARTIFACT-0.0.1-20181217.1153 17 -337.jar SOME_ARTIFACT-0.0.1-20181217.1153 17 -337.jar

This is not happening all the time, but from time to time I see this problem, and in order to solve this I need to redeploy SOME_ARTIFACT before building the application that depends on SOME_ARTIFACT. 这并不是一直都在发生,但是我不时看到这个问题,为了解决这个问题,我需要在构建依赖于SOME_ARTIFACT的应用程序之前重新部署SOME_ARTIFACT。

Do you have any idea why this is happening? 您知道为什么会这样吗? I know I can use release versions and totally avoid this snapshot issue but this SOME_ARTIFACT is under constant update and development, so I don't wanna keep releasing, plus, what I want is to figure out the reason behind this problem not to basically avoid it. 我知道我可以使用发行版本并完全避免出现此快照问题,但是此SOME_ARTIFACT正在不断更新和开发中,所以我不想继续发行,此外,我想找出这个问题背后的原因并不能从根本上避免它。

  • Maven version: 3.5.0 Maven版本:3.5.0

  • NEXUS version: OSS 3.12.1-01 NEXUS版本:OSS 3.12.1-01

Any help is appreciated. 任何帮助表示赞赏。 Thanks! 谢谢!

Thanks for providing the Maven version. 感谢您提供Maven版本。 Likely you are being impacted by https://issues.apache.org/jira/browse/MNG-6240 . 您可能会受到https://issues.apache.org/jira/browse/MNG-6240的影响。 Update Maven (or downgrade to 3.3.9) and that should help. 更新Maven(或降级到3.3.9),这应该会有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM