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

Repair - Rebuild Maven repository metadata (maven-metadata.xml) task with GA restrictions does not work

    XMLWordPrintable

    Details

    • Notability:
      2

      Description

      Boot up the attached work directory. Observe that it has a maven-metadata.xml file in it with a version which does not exist in repository storage:

       

      <?xml version="1.0" encoding="UTF-8"?>
      <metadata>
        <groupId>org.foo.bar</groupId>
        <artifactId>project</artifactId>
        <versioning>
          <latest>1.2.7</latest>
          <release>1.2.8</release>
          <versions>
            <version>1.2.6</version>
            <version>1.2.7</version>
            <version>1.2.8</version>
          </versions>
          <lastUpdated>20200122203438</lastUpdated>
        </versioning>
      </metadata>
      

       The reason the file is in this state is that I deployed version 1.2.8, and then removed all of its assets via the "DELETE /v1/assets/{id}" REST API.

      Now go to "system --> tasks", and see that there is a rebuild maven metadata task configured to rebuild against coordinates org.foo.bar:project . Run this task.

      The maven-metadata.xml file is not updated.

      Remove the group ID and artifact ID from the task's configuration. Run the task again.

      The maven-metadata.xml file is updated.

      Expected: Running a rebuild metadata task against a GA should rebuild the maven-metadata.xml files if they need to be rebuilt.

        Attachments

          Activity

            People

            Assignee:
            dsawa Dawid Sawa
            Reporter:
            rseddon Rich Seddon
            Last Updated By:
            Michael Prescott Michael Prescott
            Team:
            NXRM - Groot
            Votes:
            1 Vote for this issue
            Watchers:
            9 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title