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

Nexus Platform Plugin does not allow uploading pom and jar file to Nexus Repo 2

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.14.21
    • Fix Version/s: None
    • Component/s: Jenkins Plugin
    • Labels:
    • Notability:
      3
    • InvestmentLayer:
      support-escalated
    • Aha Concept:
      non-concept

      Description

      There is no way to upload a jar and a pom file using the Nexus Platform Plugin if the target repository is a Nexus Repo 2 instance.

      Using the following pipeline script will do the right thing for Nexus Repo 3, the mavenCoordinate is ignored and the pom and jar are uploaded using the coordinates from the pom file.

      But if Nexus Repo 2 is the target the plugin will first generate a pom using the coordinates, deploy the generated pom and the jar, and also try to deploy the pom file artifact. This results in a failure unless "allow redeploy" is specified in the target repository.

       

      node 
      {
          stage ('Publishing') {
              nexusPublisher nexusInstanceId: 'nexus2', 
              nexusRepositoryId: 'releases', 
              packages: [[$class: 'MavenPackage', 
              mavenAssetList: [
              [classifier: '', extension: 'pom', filePath: '/path/to/pom.xml'], 
              [classifier: '', extension: 'jar', filePath: 'path/tp/project.jar']], 
              mavenCoordinate: [artifactId: 'project', groupId: 'org.foo', packaging: 'jar', version: '1.0.0']]]
          }
      }
      

      Expected: There needs to be a way to upload a pom file and an artifact to Nexus Repo 2.x using the Nexus Platform plugin.

       

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            rseddon Rich Seddon
            Last Updated By:
            Michael Prescott Michael Prescott
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title