本文介绍了如何配置仅保留快照的N个版本的Maven或Apache Archiva的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的Archiva存储库从不删除旧快照.那会产生很多垃圾.

Our Archiva Repository never deletes old Snapshots.That generates a lot of garbage.

是否可以告诉Archiva仅保留N个快照版本?

Is it possible to tell Archiva to keep only N builds of an Snapshot?

最好的问候,基督徒.

Best Regards,Christian.

推荐答案

请通过 http://archiva.apache.org/docs/2.2.0/adminguide/repositories.html

您会发现以下内容

repository purge by days older - the first option for repository purge. Archiva will  check how old the artifact is and if it is older than the set number of days in this field,  then the artifact will be deleted respecting the retention count (see #7) of course. In order to disable the purge by number of days old and set Archiva to purge by retention count, just set the repository purge field to 0. The maximum number of days which can be set here is 1000. See the Repository Purge section below for more details.
repository purge by retention count - the second option for repository purge. When running the repository purge, Archiva will retain only the number of artifacts set for this field for a specific snapshot version. See the Repository Purge section below for more details.
delete released snapshots - specifies whether to remove those snapshot artifacts which already has release versions of it in the repository during repository purge.

这篇关于如何配置仅保留快照的N个版本的Maven或Apache Archiva的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-09 11:40