2012-09-07 27 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'以開始清理。

希望這可以幫助