如何配置Maven或Apache Archiva,它只保留快照的N个版本

d0x*_*d0x 5 archiva maven

我们的Archiva Repository永远不会删除旧的快照.这会产生大量垃圾.

是否有可能告诉Archiva只保留快照的N版本?

最诚挚的问候,基督徒.

Pra*_*nde 3

请访问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. 
Run Code Online (Sandbox Code Playgroud)