Getting the error “Upload requires at least one asset in the component” while uploading the artifacts to...











up vote
-1
down vote

favorite












I am trying to upload the artifacts to nexus repository using jenkins plugin.



Uploading the artifacts to nexus repository is working fine by providing "deploy" under jenkins build "Invoke the top level maven targets".
But with the same configuaration deployment failed with the below exception when i use the "Nexus Repository Manager Publisher" unser jenkins build.



I am getting the below error



Uploading Maven asset with groupId: com.wakaleo.gameoflife artifactId: 
gameoflife version: 1.0 To repository: gitone_snapshots
ERROR: Build step failed with exception
java.lang.IllegalArgumentException: Upload requires at least one asset in
the component
at com.sonatype.nexus.api.common.ArgumentUtils.checkArgument(SourceFile:33)
at com.sonatype.nexus.api.common.ArgumentUtils.checkArgument(SourceFile:24)
at com.sonatype.nexus.api.dc.upload(SourceFile:138)
at com.sonatype.nexus.api.repository.v3.RepositoryManagerV3Client$upload$0.call(Unknown Source)
at org.sonatype.nexus.ci.nxrm.v3.ComponentUploaderNxrm3$_upload_closure2.doCall(ComponentUploaderNxrm3.groovy:74)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
at groovy.lang.Closure.call(Closure.java:414)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.callClosureForMapEntry(DefaultGroovyMethods.java:5276)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2117)
at org.codehaus.groovy.runtime.dgm$163.invoke(Unknown Source)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at org.sonatype.nexus.ci.nxrm.v3.ComponentUploaderNxrm3.upload(ComponentUploaderNxrm3.groovy:54)
at org.sonatype.nexus.ci.nxrm.v3.ComponentUploaderNxrm3$upload.callCurrent(Unknown Source)
at org.sonatype.nexus.ci.nxrm.ComponentUploader.uploadComponents(ComponentUploader.groovy:84)
at org.sonatype.nexus.ci.nxrm.ComponentUploader$uploadComponents.call(Unknown Source)
at org.sonatype.nexus.ci.nxrm.NexusPublisherBuildStep.perform(NexusPublisherBuildStep.groovy:70)
at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
at hudson.model.Build$BuildExecution.build(Build.java:206)
at hudson.model.Build$BuildExecution.doRun(Build.java:163)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
at hudson.model.Run.execute(Run.java:1819)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Build step 'Nexus Repository Manager Publisher' marked build as failure
Finished: FAILURE


I have the following configuartion in jenkins:



**Nexus Repository Manager Publisher**

Nexus Instance : nexus_gitone
Nexus Repository : gitone_snapshots


**Packages**

Group : com.wakaleo.gameoflife
Artifact : gameoflife
Version : 1.0


and the following code in the pom.xml



<distributionManagement>
<repository>
<id>nexus</id>
<name>gitone_releases</name>
<url>http://IP:8081/repository/gitone_releases/</url>
</repository>
<snapshotRepository>
<id>nexus</id>
<name>gitone_snapshots</name>
<url>http://IP:8081/repository/gitone_snapshots/</url>
</snapshotRepository>
</distributionManagement>









share|improve this question


























    up vote
    -1
    down vote

    favorite












    I am trying to upload the artifacts to nexus repository using jenkins plugin.



    Uploading the artifacts to nexus repository is working fine by providing "deploy" under jenkins build "Invoke the top level maven targets".
    But with the same configuaration deployment failed with the below exception when i use the "Nexus Repository Manager Publisher" unser jenkins build.



    I am getting the below error



    Uploading Maven asset with groupId: com.wakaleo.gameoflife artifactId: 
    gameoflife version: 1.0 To repository: gitone_snapshots
    ERROR: Build step failed with exception
    java.lang.IllegalArgumentException: Upload requires at least one asset in
    the component
    at com.sonatype.nexus.api.common.ArgumentUtils.checkArgument(SourceFile:33)
    at com.sonatype.nexus.api.common.ArgumentUtils.checkArgument(SourceFile:24)
    at com.sonatype.nexus.api.dc.upload(SourceFile:138)
    at com.sonatype.nexus.api.repository.v3.RepositoryManagerV3Client$upload$0.call(Unknown Source)
    at org.sonatype.nexus.ci.nxrm.v3.ComponentUploaderNxrm3$_upload_closure2.doCall(ComponentUploaderNxrm3.groovy:74)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
    at groovy.lang.Closure.call(Closure.java:414)
    at org.codehaus.groovy.runtime.DefaultGroovyMethods.callClosureForMapEntry(DefaultGroovyMethods.java:5276)
    at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2117)
    at org.codehaus.groovy.runtime.dgm$163.invoke(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
    at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
    at org.sonatype.nexus.ci.nxrm.v3.ComponentUploaderNxrm3.upload(ComponentUploaderNxrm3.groovy:54)
    at org.sonatype.nexus.ci.nxrm.v3.ComponentUploaderNxrm3$upload.callCurrent(Unknown Source)
    at org.sonatype.nexus.ci.nxrm.ComponentUploader.uploadComponents(ComponentUploader.groovy:84)
    at org.sonatype.nexus.ci.nxrm.ComponentUploader$uploadComponents.call(Unknown Source)
    at org.sonatype.nexus.ci.nxrm.NexusPublisherBuildStep.perform(NexusPublisherBuildStep.groovy:70)
    at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81)
    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
    at hudson.model.Build$BuildExecution.build(Build.java:206)
    at hudson.model.Build$BuildExecution.doRun(Build.java:163)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
    at hudson.model.Run.execute(Run.java:1819)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:97)
    at hudson.model.Executor.run(Executor.java:429)
    Build step 'Nexus Repository Manager Publisher' marked build as failure
    Finished: FAILURE


    I have the following configuartion in jenkins:



    **Nexus Repository Manager Publisher**

    Nexus Instance : nexus_gitone
    Nexus Repository : gitone_snapshots


    **Packages**

    Group : com.wakaleo.gameoflife
    Artifact : gameoflife
    Version : 1.0


    and the following code in the pom.xml



    <distributionManagement>
    <repository>
    <id>nexus</id>
    <name>gitone_releases</name>
    <url>http://IP:8081/repository/gitone_releases/</url>
    </repository>
    <snapshotRepository>
    <id>nexus</id>
    <name>gitone_snapshots</name>
    <url>http://IP:8081/repository/gitone_snapshots/</url>
    </snapshotRepository>
    </distributionManagement>









    share|improve this question
























      up vote
      -1
      down vote

      favorite









      up vote
      -1
      down vote

      favorite











      I am trying to upload the artifacts to nexus repository using jenkins plugin.



      Uploading the artifacts to nexus repository is working fine by providing "deploy" under jenkins build "Invoke the top level maven targets".
      But with the same configuaration deployment failed with the below exception when i use the "Nexus Repository Manager Publisher" unser jenkins build.



      I am getting the below error



      Uploading Maven asset with groupId: com.wakaleo.gameoflife artifactId: 
      gameoflife version: 1.0 To repository: gitone_snapshots
      ERROR: Build step failed with exception
      java.lang.IllegalArgumentException: Upload requires at least one asset in
      the component
      at com.sonatype.nexus.api.common.ArgumentUtils.checkArgument(SourceFile:33)
      at com.sonatype.nexus.api.common.ArgumentUtils.checkArgument(SourceFile:24)
      at com.sonatype.nexus.api.dc.upload(SourceFile:138)
      at com.sonatype.nexus.api.repository.v3.RepositoryManagerV3Client$upload$0.call(Unknown Source)
      at org.sonatype.nexus.ci.nxrm.v3.ComponentUploaderNxrm3$_upload_closure2.doCall(ComponentUploaderNxrm3.groovy:74)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
      at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
      at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
      at groovy.lang.Closure.call(Closure.java:414)
      at org.codehaus.groovy.runtime.DefaultGroovyMethods.callClosureForMapEntry(DefaultGroovyMethods.java:5276)
      at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2117)
      at org.codehaus.groovy.runtime.dgm$163.invoke(Unknown Source)
      at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
      at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
      at org.sonatype.nexus.ci.nxrm.v3.ComponentUploaderNxrm3.upload(ComponentUploaderNxrm3.groovy:54)
      at org.sonatype.nexus.ci.nxrm.v3.ComponentUploaderNxrm3$upload.callCurrent(Unknown Source)
      at org.sonatype.nexus.ci.nxrm.ComponentUploader.uploadComponents(ComponentUploader.groovy:84)
      at org.sonatype.nexus.ci.nxrm.ComponentUploader$uploadComponents.call(Unknown Source)
      at org.sonatype.nexus.ci.nxrm.NexusPublisherBuildStep.perform(NexusPublisherBuildStep.groovy:70)
      at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
      at hudson.model.Build$BuildExecution.build(Build.java:206)
      at hudson.model.Build$BuildExecution.doRun(Build.java:163)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
      at hudson.model.Run.execute(Run.java:1819)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:97)
      at hudson.model.Executor.run(Executor.java:429)
      Build step 'Nexus Repository Manager Publisher' marked build as failure
      Finished: FAILURE


      I have the following configuartion in jenkins:



      **Nexus Repository Manager Publisher**

      Nexus Instance : nexus_gitone
      Nexus Repository : gitone_snapshots


      **Packages**

      Group : com.wakaleo.gameoflife
      Artifact : gameoflife
      Version : 1.0


      and the following code in the pom.xml



      <distributionManagement>
      <repository>
      <id>nexus</id>
      <name>gitone_releases</name>
      <url>http://IP:8081/repository/gitone_releases/</url>
      </repository>
      <snapshotRepository>
      <id>nexus</id>
      <name>gitone_snapshots</name>
      <url>http://IP:8081/repository/gitone_snapshots/</url>
      </snapshotRepository>
      </distributionManagement>









      share|improve this question













      I am trying to upload the artifacts to nexus repository using jenkins plugin.



      Uploading the artifacts to nexus repository is working fine by providing "deploy" under jenkins build "Invoke the top level maven targets".
      But with the same configuaration deployment failed with the below exception when i use the "Nexus Repository Manager Publisher" unser jenkins build.



      I am getting the below error



      Uploading Maven asset with groupId: com.wakaleo.gameoflife artifactId: 
      gameoflife version: 1.0 To repository: gitone_snapshots
      ERROR: Build step failed with exception
      java.lang.IllegalArgumentException: Upload requires at least one asset in
      the component
      at com.sonatype.nexus.api.common.ArgumentUtils.checkArgument(SourceFile:33)
      at com.sonatype.nexus.api.common.ArgumentUtils.checkArgument(SourceFile:24)
      at com.sonatype.nexus.api.dc.upload(SourceFile:138)
      at com.sonatype.nexus.api.repository.v3.RepositoryManagerV3Client$upload$0.call(Unknown Source)
      at org.sonatype.nexus.ci.nxrm.v3.ComponentUploaderNxrm3$_upload_closure2.doCall(ComponentUploaderNxrm3.groovy:74)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
      at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
      at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
      at groovy.lang.Closure.call(Closure.java:414)
      at org.codehaus.groovy.runtime.DefaultGroovyMethods.callClosureForMapEntry(DefaultGroovyMethods.java:5276)
      at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2117)
      at org.codehaus.groovy.runtime.dgm$163.invoke(Unknown Source)
      at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
      at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
      at org.sonatype.nexus.ci.nxrm.v3.ComponentUploaderNxrm3.upload(ComponentUploaderNxrm3.groovy:54)
      at org.sonatype.nexus.ci.nxrm.v3.ComponentUploaderNxrm3$upload.callCurrent(Unknown Source)
      at org.sonatype.nexus.ci.nxrm.ComponentUploader.uploadComponents(ComponentUploader.groovy:84)
      at org.sonatype.nexus.ci.nxrm.ComponentUploader$uploadComponents.call(Unknown Source)
      at org.sonatype.nexus.ci.nxrm.NexusPublisherBuildStep.perform(NexusPublisherBuildStep.groovy:70)
      at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
      at hudson.model.Build$BuildExecution.build(Build.java:206)
      at hudson.model.Build$BuildExecution.doRun(Build.java:163)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
      at hudson.model.Run.execute(Run.java:1819)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:97)
      at hudson.model.Executor.run(Executor.java:429)
      Build step 'Nexus Repository Manager Publisher' marked build as failure
      Finished: FAILURE


      I have the following configuartion in jenkins:



      **Nexus Repository Manager Publisher**

      Nexus Instance : nexus_gitone
      Nexus Repository : gitone_snapshots


      **Packages**

      Group : com.wakaleo.gameoflife
      Artifact : gameoflife
      Version : 1.0


      and the following code in the pom.xml



      <distributionManagement>
      <repository>
      <id>nexus</id>
      <name>gitone_releases</name>
      <url>http://IP:8081/repository/gitone_releases/</url>
      </repository>
      <snapshotRepository>
      <id>nexus</id>
      <name>gitone_snapshots</name>
      <url>http://IP:8081/repository/gitone_snapshots/</url>
      </snapshotRepository>
      </distributionManagement>






      jenkins nexus






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 8 at 8:58









      Sushma2302

      11




      11





























          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53204352%2fgetting-the-error-upload-requires-at-least-one-asset-in-the-component-while-up%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53204352%2fgetting-the-error-upload-requires-at-least-one-asset-in-the-component-while-up%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          這個網誌中的熱門文章

          Tangent Lines Diagram Along Smooth Curve

          Yusuf al-Mu'taman ibn Hud

          Zucchini