Ways to keep specific artifact(s) forever? - Sonatype Nexus Repository - Sonatype Community

Ways to keep specific artifact(s) forever?

post by bhardwajamit23 on Jan 7, 2023

Hey guys,

I was wondering if there is a way we can achieve something like “Keep build forever” in Nexus OSS. Similar functionality exists in Jenkins which keeps the cleanup policies simpler.

I am imaging a cleanup policy where I can remove artifacts older than 15 days but can mark some specific artifacts to be out of cleanup policy by marking them as forever. This should be a common use-case.

Any suggestion or experience with this kind of use-case?


post by dsawa on Jan 9, 2023

Hi Amit,

You’re looking for a Nexus Repository Pro feature called Staging.


post by bhardwajamit23 on Jan 9, 2023

Hey Dawid,

Thanks for responding.

Is there a way/workaround this can be achieved in OSS?

I was thinking about a script that can be used as a task and we add some intelligence to it (based on a list of artifacts name/IDs). Not so sure about it though.