如何发布依赖于Maven中的第三方SNAPSHOT项目的项目 [英] how to release a project which depends on a 3rd party SNAPSHOT project in maven

查看:201
本文介绍了如何发布依赖于Maven中的第三方SNAPSHOT项目的项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用Maven发行插件发行快照项目'foo-1.0-SNAPSHOT'.该项目取决于尚未发布的第三方模块'bar-1.0-SNAPSHOT'. 我在项目的pom.xml中使用选项'allowTimestampedSnapshots'允许加时间戳的快照,但我认为除非我自己构建它,否则3rd party模块(bar)不会加时间戳,因为maven仍然抱怨未解决的SNAPSHOT依赖关系.

i would like to release a snapshot project 'foo-1.0-SNAPSHOT' using the maven release plugin. The project depends on a 3rd party module 'bar-1.0-SNAPSHOT' which is not released yet. I use the option 'allowTimestampedSnapshots' in my project's pom.xml to allow timestamped snapshots but i assume that the 3rd party module (bar) is not timestamped unless i build it myself as maven still complains about unresolved SNAPSHOT dependencies.

是否有一种方法可以释放项目foo,而与依赖的SNAPSHOT项目无关,如果没有,我如何为第三方项目添加时间戳?

Is there a way to release the project foo regardless of dependent SNAPSHOT projects and if not how could i add a timestamp to the 3rd party project?

推荐答案

简短的答案是后续答案. ...很长的答案是您可以解决它.

The short answer is see the following answer.... the long answer is you can work around it.

我过去应付的唯一方法是有效地分叉第3方库并自己削减发行量.这当然说起来容易做起来难,但是如果库很大又很复杂就很难了,而如果第三方库是封闭源代码就不可能了.一条更简单的方法可能是接近第三方并要求他们削减发行量.

The only way I have coped in the past is to effectively fork the 3rd party library and cut a release myself. This of course is easier said than done and is just plain difficult if the library is large and complex and impossible if the 3rd party library is closed source. An easier route maybe to approach the 3rd party and ask them to cut a release.

另一种选择可能是复制其pom(确保没有快照)以更改版本信息,然后在存储库中手动安装pom和工件.

Another option may be to copy their pom (ensure that it has no snapshots) change the version information and manually install the pom and artifact in your repository.

这篇关于如何发布依赖于Maven中的第三方SNAPSHOT项目的项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆