[英]How to automatically delete old versions of artifacts from hosted maven repository on OSS 3.0.0?
We are building and deploying multiple releases for various services in a single day. 我们将在一天内为各种服务构建和部署多个版本。 Due to this we are wasting a lot of storage for storing older versions of artifacts which will never be used again.
因此,我们浪费了大量的存储空间来存储较旧版本的构件,这些构件将不再使用。
Is there a way to automatically delete older versions and just keep few versions such as last 10 in OSS 3.0.0 ? 有没有一种方法可以自动删除较旧的版本,而仅保留少数版本,例如OSS 3.0.0中的最后10个?
I searched there documentation but couldn't find anything that works automatically. 我在那儿搜索了文档,但是找不到能自动运行的任何东西。 Currently I have to manually select and delete them which is very error prone and time consuming.
当前,我必须手动选择和删除它们,这非常容易出错并且很耗时。
Few details about my setup: 关于我的设置的一些细节:
There are a few options you can use in Nexus Repository 3.x for Snapshots, from https://books.sonatype.com/nexus-book/reference3/admin.html#admin-system-tasks : 您可以在https://books.sonatype.com/nexus-book/reference3/admin.html#admin-system-tasks中的Nexus知识库3.x中为快照使用一些选项:
As for Releases, removing Releases can be an anti-pattern, you generally should keep your releases around if others rely on them, etc... 至于发布,删除发布可能是一种反模式,如果其他人依赖发布,则通常应该保留发布,等等。
There is a JIRA ticket for Removing Releases which you can follow at: https://issues.sonatype.org/browse/NEXUS-10821 您可以在以下位置找到JIRA的“删除发行版”票证: https : //issues.sonatype.org/browse/NEXUS-10821
This is also answered here: Purge old release from Nexus 3 在此也可以得到答复: 从Nexus 3清除旧版本
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.