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

"Cannot relativize" due to case sensitive Windows drive name comparison

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: pipeline-maven-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.46.2
      Pipeline Maven Plugin 2.5.0
      Tomcat 8
      Oracle jdk1.8.0_121
      Windows Server 2008 R2
    • Similar Issues:

      Description

      On our Pipeline build, using the Pipeline Maven Plugin, we get a lot of errors like the following:

      ERROR: [withMaven] WARNING: Exception archiving and fingerprinting MavenArtifact{com.example:pad-admin-xyz:test-jar:tests:2.4.0-SNAPSHOT D:\jenkins\workspace\d.admin_feature_Jenkinsfile-SCSMHLROYAGBAWY5ZNNG6ALR77MVLEH3F3EFF3O7XN3RO5BL6AMA\admin\xyz\target\pad-admin-xyz-2.4.0-SNAPSHOT-tests.jar}, skip archiving of the artifacts
      java.lang.IllegalArgumentException: Cannot relativize 'D:\jenkins\workspace\d.admin_feature_Jenkinsfile-SCSMHLROYAGBAWY5ZNNG6ALR77MVLEH3F3EFF3O7XN3RO5BL6AMA\admin\xyz\target\pad-admin-xyz-2.4.0-SNAPSHOT-tests.jar' relatively to 'd:\jenkins\workspace\d.admin_feature_Jenkinsfile-SCSMHLROYAGBAWY5ZNNG6ALR77MVLEH3F3EFF3O7XN3RO5BL6AMA'
      	at org.jenkinsci.plugins.pipeline.maven.util.XmlUtils.getPathInWorkspace(XmlUtils.java:225)
      	at org.jenkinsci.plugins.pipeline.maven.publishers.GeneratedArtifactsPublisher.process(GeneratedArtifactsPublisher.java:95)
      	at org.jenkinsci.plugins.pipeline.maven.MavenSpyLogProcessor.processMavenSpyLogs(MavenSpyLogProcessor.java:109)
      	at org.jenkinsci.plugins.pipeline.maven.WithMavenStepExecution$Callback.finished(WithMavenStepExecution.java:859)
      	at org.jenkinsci.plugins.workflow.steps.BodyExecutionCallback$TailCall.onFailure(BodyExecutionCallback.java:124)
      	at org.jenkinsci.plugins.workflow.cps.CpsBodyExecution$FailureAdapter.receive(CpsBodyExecution.java:345)
      	at com.cloudbees.groovy.cps.impl.ThrowBlock$1.receive(ThrowBlock.java:68)
      	at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21)
      	at com.cloudbees.groovy.cps.Next.step(Next.java:74)
      	at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:154)
      	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18)
      	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:33)
      	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:30)
      	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108)
      	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:30)
      	at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:165)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:330)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$100(CpsThreadGroup.java:82)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:242)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:230)
      	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:64)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
      	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      

      Note the mismatch of the windows drive name in both strings, one saying `D:\`, the other `d:\`.

        Attachments

          Activity

          Hide
          kreyssel Conny Kreyßel added a comment -

          Yes. I think you could either fix the JENKINS_HOME (in my case) or the path for the node.

          Show
          kreyssel Conny Kreyßel added a comment - Yes. I think you could either fix the JENKINS_HOME (in my case) or the path for the node.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Cyrille Le Clerc
          Path:
          jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/util/XmlUtils.java
          jenkins-plugin/src/test/java/org/jenkinsci/plugins/pipeline/maven/util/XmlUtilsTest.java
          http://jenkins-ci.org/commit/pipeline-maven-plugin/6eeb98c015ab149ef0a894424cddf7f380dd5cf6
          Log:
          JENKINS-45221 use case insensitive path when computing the workspace relative path.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Cyrille Le Clerc Path: jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/util/XmlUtils.java jenkins-plugin/src/test/java/org/jenkinsci/plugins/pipeline/maven/util/XmlUtilsTest.java http://jenkins-ci.org/commit/pipeline-maven-plugin/6eeb98c015ab149ef0a894424cddf7f380dd5cf6 Log: JENKINS-45221 use case insensitive path when computing the workspace relative path.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Cyrille Le Clerc
          Path:
          jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/util/XmlUtils.java
          jenkins-plugin/src/test/java/org/jenkinsci/plugins/pipeline/maven/util/XmlUtilsTest.java
          jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/docker/JavaGitContainer/Dockerfile
          http://jenkins-ci.org/commit/pipeline-maven-plugin/3dfcb67648706cf5a1ed521b84cab57524735c5e
          Log:
          Merge pull request #66 from jenkinsci/JENKINS-45221

          JENKINS-45221 Use case insensitive path when computing the workspace relative path

          Compare: https://github.com/jenkinsci/pipeline-maven-plugin/compare/7a519b1c35a3...3dfcb6764870

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Cyrille Le Clerc Path: jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/util/XmlUtils.java jenkins-plugin/src/test/java/org/jenkinsci/plugins/pipeline/maven/util/XmlUtilsTest.java jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/docker/JavaGitContainer/Dockerfile http://jenkins-ci.org/commit/pipeline-maven-plugin/3dfcb67648706cf5a1ed521b84cab57524735c5e Log: Merge pull request #66 from jenkinsci/ JENKINS-45221 JENKINS-45221 Use case insensitive path when computing the workspace relative path Compare: https://github.com/jenkinsci/pipeline-maven-plugin/compare/7a519b1c35a3...3dfcb6764870
          Hide
          cleclerc Cyrille Le Clerc added a comment -

          Fixed in version 2.5.2

          https://github.com/jenkinsci/pipeline-maven-plugin/commit/3dfcb67648706cf5a1ed521b84cab57524735c5e

          Conny Kreyßel, Felix Neumann could you please test with 2.5.2 once it is available in your update center?

          Show
          cleclerc Cyrille Le Clerc added a comment - Fixed in version 2.5.2 https://github.com/jenkinsci/pipeline-maven-plugin/commit/3dfcb67648706cf5a1ed521b84cab57524735c5e Conny Kreyßel , Felix Neumann could you please test with 2.5.2 once it is available in your update center?
          Hide
          fxnn Felix Neumann added a comment -

          Sorry for late feedback, we couldn't update Jenkins due to internal stuff. Works now, thanks for fixing!

          Show
          fxnn Felix Neumann added a comment - Sorry for late feedback, we couldn't update Jenkins due to internal stuff. Works now, thanks for fixing!

            People

            • Assignee:
              cleclerc Cyrille Le Clerc
              Reporter:
              fxnn Felix Neumann
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: