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

Pipeline maven error: java.nio.file.InvalidPathException: Illegal char <:>

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • pipeline-maven-plugin
    • None
    • Jenkins 2.54
      Pipeline Maven Plugin 2.0.2

      I am seeing errors building my project:

      ERROR: [withMaven] WARNING Exception processing the logs generated by the Jenkins Maven Event Spy c:\hudson\workspace\overy_hotfix_8.1.1_TCD-8116-DOR4LUKCDPKMU3GGPOTIKGE66IMC66OGWMGJUF4ICKOTKHYHEMPA@tmp\withMavena7214fa3\maven-spy-20170416-200742-168.log, ignore file.  Please report a bug associated for the component 'pipeline-maven-plugin' at https://issues.jenkins-ci.org 
      java.io.IOException: java.util.concurrent.ExecutionException: java.nio.file.InvalidPathException: Illegal char <:> at index 102: c:\hudson\workspace\overy_hotfix_8.1.1_TCD-8116-DOR4LUKCDPKMU3GGPOTIKGE66IMC66OGWMGJUF4ICKOTKHYHEMPA\c:\hudson\workspace\overy_hotfix_8.1.1_TCD-8116-DOR4LUKCDPKMU3GGPOTIKGE66IMC66OGWMGJUF4ICKOTKHYHEMPA\.flattened-pom.xml
      	at hudson.FilePath.copyRecursiveTo(FilePath.java:2198)
      	at jenkins.model.StandardArtifactManager.archive(StandardArtifactManager.java:61)
      	at org.jenkinsci.plugins.pipeline.maven.reporters.GeneratedArtifactsReporter.process(GeneratedArtifactsReporter.java:99)
      	at org.jenkinsci.plugins.pipeline.maven.MavenSpyLogProcessor.processMavenSpyLogs(MavenSpyLogProcessor.java:101)
      	at org.jenkinsci.plugins.pipeline.maven.WithMavenStepExecution$Callback.finished(WithMavenStepExecution.java:770)
      	at org.jenkinsci.plugins.workflow.steps.BodyExecutionCallback$TailCall.onSuccess(BodyExecutionCallback.java:114)
      	at org.jenkinsci.plugins.workflow.cps.CpsBodyExecution$SuccessAdapter.receive(CpsBodyExecution.java:362)
      	at com.cloudbees.groovy.cps.Outcome.resumeFrom(Outcome.java:73)
      	at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:146)
      	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:328)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$100(CpsThreadGroup.java:80)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:240)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:228)
      	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)
      Caused by: java.util.concurrent.ExecutionException: java.nio.file.InvalidPathException: Illegal char <:> at index 102: c:\hudson\workspace\overy_hotfix_8.1.1_TCD-8116-DOR4LUKCDPKMU3GGPOTIKGE66IMC66OGWMGJUF4ICKOTKHYHEMPA\c:\hudson\workspace\overy_hotfix_8.1.1_TCD-8116-DOR4LUKCDPKMU3GGPOTIKGE66IMC66OGWMGJUF4ICKOTKHYHEMPA\.flattened-pom.xml
      	at hudson.remoting.Channel$2.adapt(Channel.java:862)
      	at hudson.remoting.Channel$2.adapt(Channel.java:857)
      	at hudson.remoting.FutureAdapter.get(FutureAdapter.java:55)
      	at hudson.FilePath.copyRecursiveTo(FilePath.java:2196)
      	... 27 more
      Caused by: java.nio.file.InvalidPathException: Illegal char <:> at index 102: c:\hudson\workspace\overy_hotfix_8.1.1_TCD-8116-DOR4LUKCDPKMU3GGPOTIKGE66IMC66OGWMGJUF4ICKOTKHYHEMPA\c:\hudson\workspace\overy_hotfix_8.1.1_TCD-8116-DOR4LUKCDPKMU3GGPOTIKGE66IMC66OGWMGJUF4ICKOTKHYHEMPA\.flattened-pom.xml
      	at sun.nio.fs.WindowsPathParser.normalize(Unknown Source)
      	at sun.nio.fs.WindowsPathParser.parse(Unknown Source)
      	at sun.nio.fs.WindowsPathParser.parse(Unknown Source)
      	at sun.nio.fs.WindowsPath.parse(Unknown Source)
      	at sun.nio.fs.WindowsFileSystem.getPath(Unknown Source)
      	at java.io.File.toPath(Unknown Source)
      	at hudson.util.io.TarArchiver.visit(TarArchiver.java:105)
      	at hudson.util.DirScanner.scanSingle(DirScanner.java:49)
      	at hudson.FilePath$ExplicitlySpecifiedDirScanner.scan(FilePath.java:2787)
      	at hudson.FilePath.writeToTar(FilePath.java:2234)
      	at hudson.FilePath.access$2100(FilePath.java:195)
      	at hudson.FilePath$45.invoke(FilePath.java:2177)
      	at hudson.FilePath$45.invoke(FilePath.java:2173)
      	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2714)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:153)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:50)
      	at hudson.remoting.Request$2.run(Request.java:336)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	at hudson.remoting.Engine$1$1.run(Engine.java:94)
      	at java.lang.Thread.run(Unknown Source)
      	at ......remote call to JNLP4-connect connection from 10.100.101.151/10.100.101.151:25044(Native Method)
      	at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1545)
      	at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
      	at hudson.remoting.Channel$2.adapt(Channel.java:860)
      	... 30 more
      

      I also see similar errors during the archive artifacts:

      ERROR: [withMaven] WARNING Exception processing the logs generated by the Jenkins Maven Event Spy c:\hudson\workspace\overy_hotfix_8.1.1_TCD-8116-DOR4LUKCDPKMU3GGPOTIKGE66IMC66OGWMGJUF4ICKOTKHYHEMPA@tmp\withMaven75149ef3\maven-spy-20170416-200817-884.log, ignore file.  Please report a bug associated for the component 'pipeline-maven-plugin' at https://issues.jenkins-ci.org 
      java.io.IOException: java.util.concurrent.ExecutionException: java.nio.file.InvalidPathException: Illegal char <:> at index 102: c:\hudson\workspace\overy_hotfix_8.1.1_TCD-8116-DOR4LUKCDPKMU3GGPOTIKGE66IMC66OGWMGJUF4ICKOTKHYHEMPA\c:\hudson\workspace\overy_hotfix_8.1.1_TCD-8116-DOR4LUKCDPKMU3GGPOTIKGE66IMC66OGWMGJUF4ICKOTKHYHEMPA\pom.xml
      	at hudson.FilePath.copyRecursiveTo(FilePath.java:2198)
      	at jenkins.model.StandardArtifactManager.archive(StandardArtifactManager.java:61)
      	at org.jenkinsci.plugins.pipeline.maven.reporters.GeneratedArtifactsReporter.process(GeneratedArtifactsReporter.java:99)
      	at org.jenkinsci.plugins.pipeline.maven.MavenSpyLogProcessor.processMavenSpyLogs(MavenSpyLogProcessor.java:101)
      	at org.jenkinsci.plugins.pipeline.maven.WithMavenStepExecution$Callback.finished(WithMavenStepExecution.java:770)
      	at org.jenkinsci.plugins.workflow.steps.BodyExecutionCallback$TailCall.onSuccess(BodyExecutionCallback.java:114)
      	at org.jenkinsci.plugins.workflow.cps.CpsBodyExecution$SuccessAdapter.receive(CpsBodyExecution.java:362)
      	at com.cloudbees.groovy.cps.Outcome.resumeFrom(Outcome.java:73)
      	at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:146)
      	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:328)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$100(CpsThreadGroup.java:80)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:240)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:228)
      	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)
      Caused by: java.util.concurrent.ExecutionException: java.nio.file.InvalidPathException: Illegal char <:> at index 102: c:\hudson\workspace\overy_hotfix_8.1.1_TCD-8116-DOR4LUKCDPKMU3GGPOTIKGE66IMC66OGWMGJUF4ICKOTKHYHEMPA\c:\hudson\workspace\overy_hotfix_8.1.1_TCD-8116-DOR4LUKCDPKMU3GGPOTIKGE66IMC66OGWMGJUF4ICKOTKHYHEMPA\pom.xml
      	at hudson.remoting.Channel$2.adapt(Channel.java:862)
      	at hudson.remoting.Channel$2.adapt(Channel.java:857)
      	at hudson.remoting.FutureAdapter.get(FutureAdapter.java:55)
      	at hudson.FilePath.copyRecursiveTo(FilePath.java:2196)
      	... 27 more
      Caused by: java.nio.file.InvalidPathException: Illegal char <:> at index 102: c:\hudson\workspace\overy_hotfix_8.1.1_TCD-8116-DOR4LUKCDPKMU3GGPOTIKGE66IMC66OGWMGJUF4ICKOTKHYHEMPA\c:\hudson\workspace\overy_hotfix_8.1.1_TCD-8116-DOR4LUKCDPKMU3GGPOTIKGE66IMC66OGWMGJUF4ICKOTKHYHEMPA\pom.xml
      	at sun.nio.fs.WindowsPathParser.normalize(Unknown Source)
      	at sun.nio.fs.WindowsPathParser.parse(Unknown Source)
      	at sun.nio.fs.WindowsPathParser.parse(Unknown Source)
      	at sun.nio.fs.WindowsPath.parse(Unknown Source)
      	at sun.nio.fs.WindowsFileSystem.getPath(Unknown Source)
      	at java.io.File.toPath(Unknown Source)
      	at hudson.util.io.TarArchiver.visit(TarArchiver.java:105)
      	at hudson.util.DirScanner.scanSingle(DirScanner.java:49)
      	at hudson.FilePath$ExplicitlySpecifiedDirScanner.scan(FilePath.java:2787)
      	at hudson.FilePath.writeToTar(FilePath.java:2234)
      	at hudson.FilePath.access$2100(FilePath.java:195)
      	at hudson.FilePath$45.invoke(FilePath.java:2177)
      	at hudson.FilePath$45.invoke(FilePath.java:2173)
      	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2714)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:153)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:50)
      	at hudson.remoting.Request$2.run(Request.java:336)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	at hudson.remoting.Engine$1$1.run(Engine.java:94)
      	at java.lang.Thread.run(Unknown Source)
      	at ......remote call to JNLP4-connect connection from 10.100.101.151/10.100.101.151:25044(Native Method)
      	at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1545)
      	at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
      	at hudson.remoting.Channel$2.adapt(Channel.java:860)
      	... 30 more
      

      Clearly the windows path is confusing things.

      My build script looks like this:

      pipeline {
                      agent {
                          label agentLabel
                      }
      
                      stages {
                          stage('Build') {
                              steps {
          withMaven(jdk: 'JDK8', maven: 'MVN3',
                  mavenSettingsConfig: 'org.jenkinsci.plugins.configfiles.maven.MavenSettingsConfig1422003195277') {
                                  bat "mvn -B ${args}"
                              }
                          }
                      }
                  }
              }
      

            cleclerc Cyrille Le Clerc
            bengineer Ben Middleton
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: