寻找依赖的新版本 [英] Look for new versions of dependencies

查看:117
本文介绍了寻找依赖的新版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么方法可以使Maven查找依赖的新版本吗?

Is there any way to make maven look for new versions of dependencies?

例如,我有 公地语言 公地语言 2.3

for example, i have commons-lang commons-lang 2.3

版本2.4可能会发布,我不知道.我宁愿不要手动检查(在这种情况下写2.4),因为我有很多依赖项.我想我看到了一些使Maven使用最新版本的技巧.

version 2.4 could be out, I dont know. i'd rather not check is manually(by writting 2.4 in this case), because i have many dependencies. I think i saw some trick to make maven use latest version.

推荐答案

我认为我看到了一些使Maven使用最新版本的技巧.

I think i saw some trick to make maven use latest version.

是的,有一些特殊的版本号可以解决这个问题:

Yes, there are special version numbers to handle this:

当您依赖插件或依赖项时,可以使用LATEST或RELEASE的版本值. LATEST是指特定工件的最新发行版本或快照版本,是特定存储库中最新部署的工件. RELEASE是指存储库中的最后一个非快照版本.

When you depend on a plugin or a dependency, you can use the a version value of LATEST or RELEASE. LATEST refers to the latest released or snapshot version of a particular artifact, the most recently deployed artifact in a particular repository. RELEASE refers to the last non-snapshot release in the repository.

(摘录自 Maven,权威指南)

PS:尽管书中也提到这是不太理想"的做法...

PS: although the book also mentions this as a "not-so-best" practice...

这篇关于寻找依赖的新版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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