Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-13949

Remove snapshots from Maven repository remove if released option may progress slowly

    XMLWordPrintable

    Details

    • Story Points:
      5
    • Release Note:
      Yes
    • Sprint:
      Core Sprint 103, Core Sprint 104, Core Sprint 105, Core Sprint 106

      Description

      The maven snapshot removal task is doing more work than expected. Expected that it would look at the snapshots in the snapshot repo and then check whether those exist in release repos. Instead it seems to be looking in other repos and checking whether those components exist in the snapshot repo.

      Steps to reproduce:

      Create a new maven snapshot repo and add one 0.0.1-SNAPSHOT version of a component.

      Configure the snapshot removal task with minimum snapshot count 1 and remove if released enabled with a grace period 1 day.

      Run the task with debug logging enabled.

      Expected:

      The snapshot would not be removed since it was just added, and there would be very little activity recorded in the log since there is just one snapshot in the repo and nothing to clean up.

      Actual:

      A whole bunch of debug log messages were recorded looking for components that do not exist in the snapshot repository. From the logs it looks like the task is iterating over other repositories, such as the central proxy, and checking whether those components exist in the snapshot repo.

      Example log entry:

      2017-08-09 09:47:36,007-0700 DEBUG [quartz-4-thread-18] *SYSTEM org.sonatype.nexus.repository.maven.internal.RemoveSnapshotsFacetImpl - looking in maven-snapshots for snapshots older than Tue Aug 08 09:47:35 PDT 2017 for component GAV{group='org.sonatype.nexus.buildsupport', name='nexus-buildsupport', baseVersion='2.14.3-02', count=0}

      Searching for nexus-buildsupport only exists in Central proxy repo.

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              KWright Kristofer Wright
              Reporter:
              cseney Cassandra Seney
              Last Updated By:
              Peter Lynch
              Votes:
              3 Vote for this issue
              Watchers:
              11 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title