Configuring Clearing Policy for Maven Repository
The clearing policy allows you to automatically or manually clear artifacts in batches. This helps optimizes storage, keeps artifacts organized, and ensures they are transferred correctly during development, testing, deployment, and release.
Background
A Maven snapshot is a special version that reflects the current state of ongoing development and differs from regular versions. Maven checks for new snapshots in the remote repository with each build and allows you to set limits on how many snapshot versions to retain, as well as automatically clear out expired snapshots.
Snapshot Cleanup Policy
- Click a project card to access the project and choose Artifact > Self-hosted Repos from the navigation pane.
- Select a Maven repository (Snapshot) from the list on the left and click Settings in the upper right corner of the page.
- Click the Clearing Policies tab.
- Set the maximum number of Snapshot Count. The value ranges from 1 to 1,000.
When the number of retained snapshots exceeds the set limit, the oldest snapshot is replaced by the latest version.
- Enable automatic cleanup (No by default). Click Yes and enter the number of days. Snapshots older than the specified number of days will be automatically cleaned up.
The automatic cleanup time must be set between 1 and 100 days.
- Click Save to complete the configuration.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot