Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-54165

nexusPublisher throws exceptions "Bad Request Error" after upgrade

XMLWordPrintable

       

      Jenkins ver. 2.138.2
      Nexus Repository Manager Version: Sonatype Nexus Repository ManagerOSS 3.13.0-01
      Open Source Server: YES
      Nexus-Platform-plugin version : 3.3.20180912-170211.be90294

      Nexus Repository Manager 3.x has been configured in Jenkins with the right credentials. The test works.
      I am trying to publish a maven project to the repository using the nexus-jenkins-plugin (Jenkins Plugins) and it fails with the following exception

      Note: We are not using Nexus IQ server. I have just followed instructions for configuring the Nexus Repository Manager Nexus Platform Plugin for Jenkins title " Repository Manager 3 Integration"

      Tried using other nexus plugin version too but i get the same error

      Usage:

      stage (‘Push to nexus’)

      { nexusPublisher nexusInstanceId: ‘jenkins-nexus’, nexusRepositoryId: ‘maven-releases’, packages: [[$class: ‘MavenPackage’, mavenAssetList: [[classifier: ‘’, extension: ‘’, filePath: ‘./clients/build/libs/xyz.jar’]], mavenCoordinate: [artifactId: ‘kafka-xyz’, groupId: ‘org.apache’, packaging: ‘jar’, version: ‘1.1’]]] }

      Exception:

      com.sonatype.nexus.api.dh: Bad Request
      at com.sonatype.nexus.api.di.handleResponse(SourceFile:51)
      at org.apache.http.impl.client.CloseableHttpClient.execute(SourceFile:223)
      at org.apache.http.impl.client.CloseableHttpClient.execute(SourceFile:165)
      at com.sonatype.nexus.api.dd.a(SourceFile:84)
      Caused: com.sonatype.nexus.api.exception.RepositoryManagerException: Upload component was unsuccessful (400 response from server)
      at com.sonatype.nexus.api.dd.a(SourceFile:106)
      at com.sonatype.nexus.api.dd.a(SourceFile:87)
      at com.sonatype.nexus.api.dd.a(SourceFile:65)
      at com.sonatype.nexus.api.dc.upload(SourceFile:152)
      at com.sonatype.nexus.api.repository.v3.RepositoryManagerV3Client$upload$1.call(Unknown Source)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:141)
      at org.sonatype.nexus.ci.nxrm.v3.ComponentUploaderNxrm3$_upload_closure2.doCall(ComponentUploaderNxrm3.groovy:74)
      Caused: java.io.IOException
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)
      at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:60)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:235)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:247)
      at org.sonatype.nexus.ci.nxrm.v3.ComponentUploaderNxrm3$_upload_closure2.doCall(ComponentUploaderNxrm3.groovy:77)
      Caused: java.io.IOException: Upload of maven component with GAV [org.apache:kafka-android:1.1] failed
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)
      at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:60)

            whyjustin Justin Young
            aganesan94 Arun Ganesan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: