如何仅部署 Maven 项目中的源 jar?
我们在 Nexus 存储库中发布了许多版本,但没有附加源 jar。我想回填这些版本的源罐子。
我试图做的是
- 签出我想要上传源代码的标记版本
- 使用 Attach-sources 片段更新 pom
- 进行 Maven 部署
这失败并出现 400 错误代码,因为 pom 和工件 jar 已经在存储库中。
有没有办法只上传源jar?
We made a number of releases to our nexus repository without source jars attached. I would like to backfill the source jars for these releases.
What I tried to do was
- checkout the tagged version that I wanted to upload sources for
- update the pom with the attach-sources snippet
- do a maven deploy
This failed with a 400 error code because the pom and artifact jar were already in the repository.
Is there any way to upload just the source jar?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你应该能够使用maven部署文件来做到这一点(这还有生成各种文件总和的额外好处),详细信息此处(除其他外,您将使用“packaging=jar”和“classifier=source”)。
you should be able to do this using maven deploy-file (this has the added benefit of generating the various file sums as well), details here (you would be using, among other things, "packaging=jar" and "classifier=source").
我认为最简单的事情就是使用“curl”上传源 jar。您甚至不需要为此进行任何更改。
I think the simplest thing would be to just upload sources jar using 'curl'. You will not even need to make any changes for that.