处理在本地存储库中旧的快照的最佳方式? [英] Best way to handle old snapshots in local repository?

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

问题描述

我们有它处理我们所有的内部项目的Nexus本地仓库管理器(以及镜像库外)。对于我们的内部项目,我们只保留最新版本的快照生成。例如,如果我们有projectX创建1.0,1.1和1.2-SNAPSHOT,只要1.2发布,我们将删除1.2快照,然后有1.0,1.1,1.2和我们的Nexus库1.3快照。

We have a Nexus local repository manager which handles all our internal projects (as well as mirroring outside repositories). For our internal projects, we only keep the most recent version's snapshot builds. For example if we had ProjectX 1.0, 1.1 and 1.2-SNAPSHOT, as soon as 1.2 was released we would delete 1.2-SNAPSHOT and then have 1.0, 1.1, 1.2 and 1.3-SNAPSHOT in our Nexus repository.

问题是,我们的服务器詹金斯在其本地.m2目录/存储库文件夹的所有旧的快照,并继续成功打造项目针对这些旧快照,而实际上他们应该没有(和我们的开发人员应该修正自己的POM文件)。

The problem is that our Jenkins server has all the OLD snapshots in its local .m2/repository folder and continues to build projects successfully against these old snapshots, when in reality they should be failing (and our developers should be fixing their POM files.)

能否Maven的配置(Settings.XML中或pom.xml中)来删除这些不必要的快照,如果他们不在的Nexus库present?

Can Maven be configured (in settings.xml or pom.xml) to delete these unwanted snapshots if they are not present in the Nexus repository?

如果没有,什么是摆脱他们的最好方法?詹金斯配置,cron作业,其他的选择吗?

If not, what's the best way to get rid of them? Jenkins configuration, cron job, other option?

谢谢...

推荐答案

您可以尝试的 Maven的回购清洁詹金斯插件

这篇关于处理在本地存储库中旧的快照的最佳方式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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