I've recently set up NXRM3.13.0-01 and have been building an artifact snapshot to the maven-snapshots repository. The integration with my local maven build seems ok. It reads from Nexus, deploys the latest timestamped artifact when built and gets the latest timestamped snapshot when told to. I have a Maven - Delete Snapshot task configured to remove snapshots with the following configuration:
Repositories: All Repositories
Snapshot retention (days): 30
Minimum snapshot count: 3
Remove if released: yes
Grace period after release (days): 7
When this task runs though, it does not remove anything from the snapshot repository. I also ran a Compact Blob Store task after as per the docs in case reclaiming the disk space was required but to no avail. From the logs, I can see that the two versions 1.0 and 5.8.01 are identified as candidates. However, no artifacts are purged. In the logs I can see the following. It finds no qualifying artifacts for removal:
2018-09-13 10:12:49,423+0000 INFO [qtp1041814774-1123] admin org.sonatype.nexus.quartz.internal.task.QuartzTaskInfo - Task 'Mark Snapshots for Deletion' [repository.maven.remove-snapshots] runNow
2018-09-13 10:12:49,424+0000 INFO [qtp1041814774-1123] admin org.sonatype.nexus.quartz.internal.task.QuartzTaskInfo - Task 'Mark Snapshots for Deletion' [repository.maven.remove-snapshots] state change WAITING -> RUNNING
2018-09-13 10:12:49,459+0000 INFO [quartz-5-thread-20] *SYSTEM org.sonatype.nexus.repository.maven.tasks.RemoveSnapshotsTask - Task log: /nexus-data/log/tasks/repository.maven.remove-snapshots-20180913101249447.log
2018-09-13 10:12:49,460+0000 INFO [quartz-5-thread-20] *SYSTEM org.sonatype.nexus.repository.maven.tasks.RemoveSnapshotsTask - Executing removal of snapshots on repository 'maven-snapshots'
2018-09-13 10:12:49,496+0000 INFO [quartz-5-thread-20] *SYSTEM org.sonatype.nexus.repository.maven.internal.RemoveSnapshotsFacetImpl - Beginning snapshot removal on repository 'maven-snapshots' with configuration: org.sonatype.nexus.repository.maven.tasks.RemoveSnapshotsConfig(minimumRetained:3, snapshotRetentionDays:30, removeIfReleased:true, gracePeriod:7)
2018-09-13 10:12:49,497+0000 INFO [quartz-5-thread-20] *SYSTEM org.sonatype.nexus.repository.maven.internal.RemoveSnapshotsFacetImpl - Begin processing snapshots in repository 'maven-snapshots'
2018-09-13 10:12:49,504+0000 INFO [quartz-5-thread-20] *SYSTEM org.sonatype.nexus.repository.maven.internal.RemoveSnapshotsFacetImpl - Found 2 snapshot GAVs to analyze
2018-09-13 10:12:49,516+0000 INFO [quartz-5-thread-20] *SYSTEM org.sonatype.nexus.repository.maven.internal.RemoveSnapshotsFacetImpl - ---- Searching for GAVS with snapshots that qualify for deletion on repository 'maven-snapshots' ----
2018-09-13 10:12:49,517+0000 INFO [quartz-5-thread-20] *SYSTEM org.sonatype.nexus.repository.maven.internal.RemoveSnapshotsFacetImpl - Elapsed time: 12.14 ms, deleted 0 components from 0 distinct GAVs
2018-09-13 10:12:49,518+0000 INFO [quartz-5-thread-20] *SYSTEM org.sonatype.nexus.repository.maven.internal.RemoveSnapshotsFacetImpl - Finished processing snapshots with more than 3 versions created before 2018-08-14T10:12:49.517Z
2018-09-13 10:12:49,518+0000 INFO [quartz-5-thread-20] *SYSTEM org.sonatype.nexus.repository.maven.internal.RemoveSnapshotsFacetImpl - Updating metadata on repository 'maven-snapshots'
2018-09-13 10:12:49,519+0000 INFO [quartz-5-thread-20] *SYSTEM org.sonatype.nexus.repository.maven.internal.RemoveSnapshotsFacetImpl - Completed snapshot removal on repository 'maven-snapshots'
2018-09-13 10:12:49,520+0000 INFO [quartz-5-thread-20] *SYSTEM org.sonatype.nexus.quartz.internal.task.QuartzTaskInfo - Task 'Mark Snapshots for Deletion' [repository.maven.remove-snapshots] state change RUNNING -> WAITING (OK)
The snapshot repository is as follows. My assumption would be that the top two for v5.8.01-SNAPSHOT would be removed and that the lower two would be kept based on the task config:
My questions are:
- Have I missed something?
- What can I do to get the desired behaviour?