We're using Amazon S3 as Maven repository. With time the size of the repo is getting too big, mostly because we deploy a few snapshots per day. Is there any way to "clean" the repo by removing too old variants of the same version (1.0-SNAPSHOT
, for example). Or maybe we can avoid them at the first place?
Asked
Active
Viewed 365 times
0

yegor256
- 102,010
- 123
- 446
- 597
-
As mentioned by Ian, Maven repository managers like Nexus have features for purging snapshots. Without them you must maintain them yourself... – Mark O'Connor Aug 06 '12 at 20:20
1 Answers
1
S3 has a facility to automatically expire objects via what it calls lifecycle configuration, but this is quite limited - expiry is based only on the age of the objects (e.g. delete anything older than 90 days), you can't say things like "keep only the ten most recent snapshots" like Nexus can do. If you need that kind of functionality you would probably have to code it yourself as part of your snapshot deployment process.

Ian Roberts
- 120,891
- 16
- 170
- 183