maven中的updatePolicy到底是如何工作的?
当我在 Maven 设置中定义 updatePolicy 时,它会告诉 Maven 快照工件的下载频率。
如果我将其设置为始终,它当然会每次下载所有快照。
我想知道如果我将其设置为每日默认值或另一个更长的周期会发生什么。
maven 是否仍然检查快照的新版本是否可用,如果是,它是否会下载它,尽管策略说每天?
我正在寻找正确的设置,以避免冗余下载,并且不要错过更新的快照。
When I define an updatePolicy
in my maven settings it tells maven how often snapshot artifacts shall be downloaded.
If I set it to always it of course downloads every time all snapshots.
I was wondering what happens if I set it to the default value daily or another longer peroid.
Does maven still check whether a new version of the snapshot is available and if so, does it download it although the policy says daily ?
I'm looking for the correct settings to avoid redundant downloads and not to miss a newer snapshot out there.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
存储库 - SNAPSHOT 处理 解释它可能比 < a href="http://maven.apache.org/pom.html#Repositories" rel="noreferrer">POM 参考:
我认为没有任何可添加的内容(除了检查!=下载)。
嗯,不,为什么会这样呢?
如果您始终希望 Maven 下载快照的较新版本(如果可用),请使用
always
(Maven 将始终检查远程存储库,但仅检查 >下载如果版本较新)。The Repository - SNAPSHOT Handling explains it maybe better than the POM reference:
I don't think there is anything to add (except maybe that check != download).
Well, no, why would it?
Use
always
if you always want Maven to download a newer version of snapshots, if available (Maven will always check the remote repository but only download if the version is newer).