Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top