部署maven jar文件和SNAPSHOT依赖项 [英] deploying maven jar files and SNAPSHOT dependencies

查看:423
本文介绍了部署maven jar文件和SNAPSHOT依赖项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们目前在开发中使用SNAPSHOT修饰符,以便将项目依赖关系链接到其依赖项的最新构建。所以当我们建立一个项目,我们得到所有的罐子与各种时间SNAPSHOTS。无论代码更改。

We currently use SNAPSHOT modifier in development so that project dependencies are linked to the most current build of its dependencies. So when we build a project we get all the jars with various time SNAPSHOTS. Regardless of a code change.

这是最终用户想要下载新版本时的问题。例如,有一个很少更新的大jar文件。我们想要的那个特定的jar文件被称为它的版本号1.4应该是1.4-SNAPSHOT当我们释放它给客户意味着,当我们更改版本号时,我们的版本号,我们最后一次建立它或不改变。

This proves to be an issue when the end user wants to download a new release. For example there is a big jar file that is rarely updated. We would like for that particular jar file to be referred to as it version number 1.4 as supposed to 1.4-SNAPSHOT when we release it to the customer meaning they only download new version when we make changes to the version number as supposed to when we last built it with or without changes.

什么是实现这个的最好的方法?我错过了什么?

What is the best way to achieve this? Am I missing something?

请谢谢。

推荐答案


这是最终用户想要下载新版本时的问题。

This proves to be an issue when the end user wants to download a new release.

首先,发布应该使用固定版本。因此,如果你正在开发版本1.4-SNAPSHOT,发布版本应该是1.4(并在你的VCS中这样标记)。然后你在开发分支中将新开发版本碰到1.5-SNAPSHOT。

First of all, releases should indeed use fixed versions. So if you're developing version 1.4-SNAPSHOT, the release version is supposed to be 1.4 (and you tag it as such in your VCS). And then you bump the new development version to 1.5-SNAPSHOT in the dev branch.


例如,有一个很大的jar文件更新。我们希望该特定的jar文件被称为版本号1.4(...)

For example there is a big jar file that is rarely updated. We would like for that particular jar file to be referred to as it version number 1.4 (...)

但是即使你遵循上面的标准过程,没有什么强迫你在发布后触发所有版本,你可以坚持一个特定工件的给定固定版本。这将消除该问题。

But even if you follow the above "standard" process, nothing forces you to bump all versions after a release and you could just stick to a given fixed version of a particular artifact. This would remove the problem.

这篇关于部署maven jar文件和SNAPSHOT依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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