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

If maven group or artifact name name contains "SNAPSHOT" then it is considered a maven snapshot

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 2.14.18
    • Fix Version/s: 3.8.0
    • Component/s: Maven
    • Labels:
    • Notability:
      4

      Description

      If maven group or artifact name contains "SNAPSHOT" then Nexus 2 considers it to be maven snapshot and fails generate the maven-metadata.xml

      The artifact get uploaded to maven release repository, but fails to generate the maven-metadata.xml

      Below is an example to reproduce:

      curl -v -F r=releases -F hasPom=false -F e=jar -F g=com.test -F a=project-SNAPSHOT -F v=1.0.0 -F p=jar -F file=@example.jar -u admin:admin123 http://localhost:8081/nexus2/service/local/artifact/maven/content
      

       
      The artifacts are uploaded but maven-metadata.xml fails to generate.

      2020-09-08 09:38:37,297+0100 INFO [qtp89711495-95] admin org.sonatype.nexus.proxy.maven.maven2.M2Repository - Storing of item releases:/com/test/project-SNAPSHOT/maven-metadata.xml is forbidden by Maven Repository policy. Because releases is a RELEASE repository
      2020-09-08 09:38:37,298+0100 WARN [qtp89711495-95] admin org.sonatype.nexus.rest.artifact.ArtifactContentPlexusResource - IO problem!
      org.sonatype.nexus.proxy.LocalStorageException: Could not maintain metadata!
       at org.sonatype.nexus.proxy.maven.ArtifactStoreHelper.storeArtifactWithGeneratedPom(ArtifactStoreHelper.java:490)
       at org.sonatype.nexus.rest.artifact.AbstractArtifactPlexusResource.upload(AbstractArtifactPlexusResource.java:391)
      

      Nexus 2 should only check for "-SNAPSHOT" in version, not in maven group or artifact name. Nexus 3 does not have this same issue.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              msurani Mahendra Surani
              Last Updated By:
              Peter Lynch Peter Lynch
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title