梅文 +哈德森+ Nexus:访问快照版本号
现在 Maven3 已不再支持在部署时设置 uniqueVersion=false,我遇到了一个问题。我让 Hudson 将我的 SNAPSHOT 版本自动部署到我的 Nexus 存储库管理器。生成的 SNAPSHOT 工件看起来像 blah-0.0.1-20110517.233746-1.jar。请注意唯一的 SNAPSHOT 构建 ID。诀窍是我会在我的站点文档中链接到该 jar,但我不确定如何将该快照构建号注入到文档中。也许有一种方法可以让 Maven 或 Hudson 或 Nexus 在部署时从 blah-0.0.1.jar => 创建符号链接blah-0.0.1-20110517.233746-1.jar?
Now that Maven3 has dropped support for setting uniqueVersion=false on deployment, I'm running into an issue. I have Hudson do an automatic deployment of my SNAPSHOT build to my Nexus repository manager. The resulting SNAPSHOT artifact looks like blah-0.0.1-20110517.233746-1.jar. Note the unique SNAPSHOT build id. The trick is that I'd link to that jar in my site documentation, but I'm not sure how to inject that snapshot build number into the docs. Perhaps there is a way to have Maven or Hudson or Nexus create a symlink on deployment from blah-0.0.1.jar => blah-0.0.1-20110517.233746-1.jar?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,让我失望,但我想我找到了自己问题的答案。我在这里发帖以防其他人发现它有用。
事实证明,Nexus REST api 能够自动检索工件的最新快照版本,这正是我需要的功能。有关详细信息,请参阅:
https://docs .sonatype.com/display/SPRTNXOSS/Nexus+FAQ#NexusFAQ-Q.HowcanIretrieveasnapshotifIdon%27tknowtheexactfilename%3F
Ok, mod me down, but I think I found an answer to my own question. I'm posting here in case anyone else finds it useful.
It turns out the Nexus REST api has the ability to automatically retrieve the latest SNAPSHOT build of an artifact, which is exactly the functionality I needed. For more info, see:
https://docs.sonatype.com/display/SPRTNXOSS/Nexus+FAQ#NexusFAQ-Q.HowcanIretrieveasnapshotifIdon%27tknowtheexactfilename%3F