Configuring Clearing Policy for a Maven Repository
You can automatically and manually delete artifacts that meet deletion conditions in batches. When a user creates a Maven repository, the storage repositories include Release and Snapshot.
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.
The clearing policy reduces the waste of storage space, makes artifacts in the repository clear, and ensures that artifacts are transferred in order during development, testing, deployment, and release.
- 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.
Figure 1 Clearing policies
- 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