2012-09-07 32 views

回答

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. 
+1

和配置以上参数后,别忘了去“库扫描 - >消费者”,并确保在“存储库清除”启用(点击图标启用/禁用)。 –

+0

我们使用的是archiva 2.2.1,即使在消费者使用'repository'扫描时,“by date”dos似乎也不起作用。执行任务'资源库清除',输出总计/平均时间和计数,但...似乎没有任何东西被删除。我试图增加日志级别,但是......似乎没有选项,也没有log4j.xml配置文件 – Wojtek

1

不要忘了去:

Repository Scanning -> Consumers 

,并确保该repository-purge启用

1

我知道它已经被回答,但我有同样的问题接收ntly,不得不做一个步骤的详细:路径回购指着一个错误的目录,尽管正确的配置,清洁快照不工作...

要解决的路径,请访问:

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

当这样做时,快照清理开始工作。

[编辑 - 2017年11月2日]

Additionnaly,我想知道为什么一些附加工件(如HTML文件)当主文物进行清洗并没有被清理。我刚刚弄明白了:如果它不是来自Archiva的工件类型,则必须指定扩展名。 例如在我的情况下,在存储库扫描 - >文件类型 - >工件 - >我必须为附加的html文件添加'**/*。html'以开始清理。

希望这可以帮助