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

Exception archiving and fingerprinting MavenArtifact

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: pipeline-maven-plugin
    • Labels:
      None
    • Environment:
      CentOS7 + Jenkins 2.53, pipeline-maven 2.0.2, Buildserver CentOS7 + docker + Ubuntu 12.04
    • Similar Issues:

      Description

      Warning Exception archiving and fingerprinting MavenArtifact appears when trying to archive a jar file.

      I'm using mvn clean test and because of this, no jar should be created.

      A empty .jar folder is shown inside "Build Artifacts". Screenshot attached.

      When running mvn clean install, the jar file is created and archived correctly.

      Workspace path hash is due to parallel use but even not using parallel, the warning persists.

      [release] [withMaven] Archive pom.xml under com/world/hello/helloworldapp/2.46-SNAPSHOT/helloworldapp-2.46-SNAPSHOT.pom
      [release] [withMaven] Archive target/classes under com/world/hello/helloworldapp/2.46-SNAPSHOT/helloworldapp-2.46-SNAPSHOT.jar
      [release] ERROR: [withMaven] WARNING: Exception archiving and fingerprinting MavenArtifact{com.world.hello:helloworldapp:jar:2.46-SNAPSHOT /var/lib/jenkins/workspace/ranch-hello-world_newbranch-VZQTCZGV3IVUVFLI4NTYN4CQPE7RH5RPEDQ7RRZ6UJEGWBNRIF2Q@3/target/classes}, skip archiving of the artifacts
      [release] java.io.IOException: remote file operation failed: /var/lib/jenkins/workspace/ranch-hello-world_newbranch-VZQTCZGV3IVUVFLI4NTYN4CQPE7RH5RPEDQ7RRZ6UJEGWBNRIF2Q@3/target/classes at hudson.remoting.Channel@622e9fea:centos-buildserver-02: java.io.IOException: Is a directory
      [release] 	at hudson.FilePath.act(FilePath.java:993)
      [release] 	at hudson.FilePath.act(FilePath.java:975)
      [release] 	at hudson.FilePath.digest(FilePath.java:1920)
      [release] 	at org.jenkinsci.plugins.pipeline.maven.reporters.GeneratedArtifactsReporter.process(GeneratedArtifactsReporter.java:84)
      [release] 	at org.jenkinsci.plugins.pipeline.maven.MavenSpyLogProcessor.processMavenSpyLogs(MavenSpyLogProcessor.java:101)
      [release] 	at org.jenkinsci.plugins.pipeline.maven.WithMavenStepExecution$Callback.finished(WithMavenStepExecution.java:770)
      [release] 	at org.jenkinsci.plugins.workflow.steps.BodyExecutionCallback$TailCall.onSuccess(BodyExecutionCallback.java:114)
      [release] 	at org.jenkinsci.plugins.workflow.cps.CpsBodyExecution$SuccessAdapter.receive(CpsBodyExecution.java:362)
      [release] 	at com.cloudbees.groovy.cps.Outcome.resumeFrom(Outcome.java:73)
      [release] 	at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:146)
      [release] 	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18)
      [release] 	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:33)
      [release] 	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:30)
      [release] 	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108)
      [release] 	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:30)
      [release] 	at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:165)
      [release] 	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:328)
      [release] 	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$100(CpsThreadGroup.java:80)
      [release] 	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:240)
      [release] 	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:228)
      [release] 	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:64)
      [release] 	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      [release] 	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
      [release] 	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
      [release] 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:473)
      [release] 	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      [release] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      [release] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      [release] 	at java.lang.Thread.run(Thread.java:745)
      [release] Caused by: java.io.IOException: Is a directory
      [release] 	at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
      [release] 	at sun.nio.ch.FileDispatcherImpl.read(FileDispatcherImpl.java:46)
      [release] 	at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
      [release] 	at sun.nio.ch.IOUtil.read(IOUtil.java:197)
      [release] 	at sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:149)
      [release] 	at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:65)
      [release] 	at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:109)
      [release] 	at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:103)
      [release] 	at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
      [release] 	at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
      [release] 	at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
      [release] 	at java.security.DigestInputStream.read(DigestInputStream.java:161)
      [release] 	at java.io.FilterInputStream.read(FilterInputStream.java:107)
      [release] 	at hudson.Util.getDigestOf(Util.java:769)
      [release] 	at hudson.Util.getDigestOf(Util.java:804)
      [release] 	at hudson.FilePath$38.invoke(FilePath.java:1923)
      [release] 	at hudson.FilePath$38.invoke(FilePath.java:1920)
      [release] 	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2732)
      [release] 	at hudson.remoting.UserRequest.perform(UserRequest.java:153)
      [release] 	at hudson.remoting.UserRequest.perform(UserRequest.java:50)
      [release] 	at hudson.remoting.Request$2.run(Request.java:336)
      [release] 	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      [release] 	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      [release] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      [release] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      [release] 	at java.lang.Thread.run(Thread.java:745)
      [release] 	at ......remote call to centos-buildserver-02(Native Method)
      [release] 	at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1545)
      [release] 	at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
      [release] 	at hudson.remoting.Channel.call(Channel.java:830)
      [release] 	at hudson.FilePath.act(FilePath.java:986)
      [release] 	... 28 more
      

      This archive behavior is seen after update pipeline-maven from 0.7 to 2.0.2. (as expected according the release notes).

      Since this archive feature is not useful for us at the moment, I used the workaround mentioned here to avoid archive.

        Attachments

          Issue Links

            Activity

            Show
            cleclerc Cyrille Le Clerc added a comment - Reproduced with https://gist.github.com/cyrille-leclerc/c596bd1f4c3aab1718db640e34cacf94
            Hide
            cleclerc Cyrille Le Clerc added a comment -

            Will be fixed in 2.0.3

            Show
            cleclerc Cyrille Le Clerc added a comment - Will be fixed in 2.0.3
            Hide
            cleclerc Cyrille Le Clerc added a comment -

            Nuno Costa can you please confirm that this bug is fixed in version 2.0.3?

            Show
            cleclerc Cyrille Le Clerc added a comment - Nuno Costa can you please confirm that this bug is fixed in version 2.0.3?
            Hide
            ncosta Nuno Costa added a comment -

            Yes, it's fixed.

            No longer seeing any issue using mvn test.

            Thanks

            Show
            ncosta Nuno Costa added a comment - Yes, it's fixed. No longer seeing any issue using mvn test. Thanks
            Hide
            ncosta Nuno Costa added a comment - - edited

            Cyrille Le Clerc, just noticed some warnings in the Jenkins logs, regarding a no associated file found for MavenArtifact.

            Pom file is archived but the packaging file extension throws the warning, because is not created (as expected) during mvn test.

            May 09, 2017 10:32:29 AM WARNING org.jenkinsci.plugins.pipeline.maven.reporters.GeneratedArtifactsReporter listArtifacts
            listArtifacts: Project MavenArtifact{com.xxx:My_Project::my_version}: no associated file found for MavenArtifact{com.xxx:My_Project:My_file_extension:my_version}

            Build log also showing:

            [withMaven] Can't archive maven artifact with no file attached: MavenArtifact{com.xxx:My_Project:My_file_extension:my_version }
            

            The file extension is a custom one, that is basically a zip file with other files inside.

            Adding the workaround to skip the reports clears the warnings in Jenkins and Build logs.

            Using mvn install works correctly with no warnings and files being archived.

            This behaviour is seen on pipeline-maven 2.1.0.

            Is this working as designed or could be related with the previous issue?

            Show
            ncosta Nuno Costa added a comment - - edited Cyrille Le Clerc , just noticed some warnings in the Jenkins logs, regarding a no associated file found for MavenArtifact. Pom file is archived but the packaging file extension throws the warning, because is not created (as expected) during mvn test. May 09, 2017 10:32:29 AM WARNING org.jenkinsci.plugins.pipeline.maven.reporters.GeneratedArtifactsReporter listArtifacts listArtifacts: Project MavenArtifact{com.xxx:My_Project::my_version}: no associated file found for MavenArtifact{com.xxx:My_Project:My_file_extension:my_version} Build log also showing: [withMaven] Can't archive maven artifact with no file attached: MavenArtifact{com.xxx:My_Project:My_file_extension:my_version } The file extension is a custom one, that is basically a zip file with other files inside. Adding the workaround to skip the reports clears the warnings in Jenkins and Build logs. Using mvn install works correctly with no warnings and files being archived. This behaviour is seen on pipeline-maven 2.1.0. Is this working as designed or could be related with the previous issue?
            Hide
            cleclerc Cyrille Le Clerc added a comment -

            Nuno Costa the problem you report does not seem to be related to this issue, thanks for creating JENKINS-44366

            Show
            cleclerc Cyrille Le Clerc added a comment - Nuno Costa the problem you report does not seem to be related to this issue, thanks for creating  JENKINS-44366

              People

              • Assignee:
                cleclerc Cyrille Le Clerc
                Reporter:
                ncosta Nuno Costa
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: