Maven快照存储库 [英] maven snapshot repositories

查看:139
本文介绍了Maven快照存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的项目依赖于一个第三方库,该库在其maven存储库中仅具有快照(没有发行版,这看起来很奇怪,但这就是事实).每次我完成一个完整的构建(并清理我的本地.m2存储库),maven显然都会去获取最新的构建.

My project depends on a 3rd party library that only has snapshots in its maven repository (no releases, which seems strange, but that's how it is). Every time I do a full build (and clean my local .m2 repository) maven will obviously go and grab the latest build.

我的存储库代理其中包含快照的存储库,是否有任何办法告诉我的存储库停止提取新版本并基本上只保留当前版本?我真的不想每晚都搬一个新楼.

My repository proxies the one with the snapshots in it, is there anyway to tell my repository to stop pulling new versions and basically just keep the current version? I really don't want to be pulling a new build every night.

我唯一的想法是手动标记当前版本,但是有很多依赖项,它们都依赖于SNAPSHOT版本.有没有更简单的方法可以做到这一点?

The only thought I had is to manually label the current versions, but there quite a few dependencies and they are all dependent on the SNAPSHOT versions. Is there an easier way to do this?

谢谢

杰夫

推荐答案

从sonatype看此博客条目:

Take a look at this blog entry from sonatype: Best Practices for 3rd Party Snapshot Dependencies

我通常将文件作为某个版本安装到我的代理或本地存储库中,然后再引用该版本.这样一来,您就不必冒险快照从您的身下消失了.

I usually install the file to my proxy or local repo as a certain version, and then refer to that version. Then you don't risk the snapshot disappearing out from under you.

这篇关于Maven快照存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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