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

404 error when trying to download existing snapshot

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.0-beta
    • Fix Version/s: 1.0-beta
    • Component/s: None
    • Labels:
      None
    • Environment:
      nexus-1.0.0-beta-3.1, Solaris or Windows

      Description

      We discovered this issue while trying to deploy snapshots to our Nexus repository. We have an artifact with groupId (anonymized of course) "foo.bar.account", artifactId "bar-account-app", and version "1.0-SNAPSHOT". When we do a deploy to Nexus, it succeeds. However, when we try to view it in the UI or download it through Maven, we get a 404 error. We can see the artifact has been uploaded and is present on disk. If we change the artifactId to "bar_account_app", or to "baraccount-app", or something like that, it works fine.

      This is a major issue, as we would prefer not to have to go and rename all of our artifact IDs. The issue seems to crop up somewhere in the parsing of the version string by org.sonatype.nexus.artifact.M2GavCalculator. When M2GavCalculator.calculate is called with underscores (The one that works), it returns null. When it gets called with the artifactId with dashes, it seems to return a Gav that incorrectly indicates that it is not a snapshot, and hence it is not served up by the snapshot repo.

      To reproduce this, take the attached .zip file and a fresh install of Nexus beta 3.1. Unzip the zip file into the storage/snapshots directory and use the Web UI to browse down the hierarchy. You will be able to expand the bar_account_app node under "foo.bar", but not the "bar-account-app".

        Attachments

          Activity

            People

            Assignee:
            koconnor Kristine O'Connor
            Reporter:
            deleted_user Deleted User
            Last Updated By:
            Peter Lynch Peter Lynch
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title