5

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

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

最好的问候,克里斯蒂安。

4

3 回答 3

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. 
于 2012-09-07T12:22:53.847 回答
3

别忘了去:

Repository Scanning -> Consumers

并确保repository-purge已启用

于 2016-07-20T12:00:28.657 回答
1

我知道它已经被回答了,但我最近遇到了同样的问题,不得不再做一步:repo 的路径指向错误的目录,尽管配置正确,但清理快照不起作用......

要更正路径,请转至:

Repositories Administration --> Managed Repositories Management --> 编辑“Archiva Managed Snapshot Repository” --> 将“Directory”参数设置为正确的值(对我来说是“/var/lib/apache-archiva-2.2.0/存储库/快照”)。

执行此操作时,快照清理开始工作。

[编辑 - 2017-11-02]

另外,我想知道为什么在清理主要工件时没有清理一些附加的工件(例如 html 文件)。我刚刚弄清楚了:如果它不是来自 Archiva 的工件类型,则必须指定扩展名。例如,在我的情况下,在存储库扫描 --> 文件类型 --> 工件 --> 我必须添加 '**/*.html' 以开始清理附加的 html 文件。

希望这可能会有所帮助

于 2016-07-20T12:08:28.260 回答