-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
Jenkins master ver. 2.46.1 on RHEL 7.3
Pipeline maven Integration Plugin 2.0.2
Jenkins slave ver 2.46.1 on Windows 2012 R2
Our build agent environment is configured with Git for Windows 2.11.0.3 added on the paths (/mingw64/bin;/usr/bin) for both the Windows 2012 R2 OS system default path and on the Jenkins Build Agents overridden path. This provides the required "nohup", "bash" and other Unix on Windows command line utilities to allow use of the same sh() pipeline steps in builds directed to Linux agents and Windows agents.Jenkins master ver. 2.46.1 on RHEL 7.3 Pipeline maven Integration Plugin 2.0.2 Jenkins slave ver 2.46.1 on Windows 2012 R2 Our build agent environment is configured with Git for Windows 2.11.0.3 added on the paths (/mingw64/bin;/usr/bin) for both the Windows 2012 R2 OS system default path and on the Jenkins Build Agents overridden path. This provides the required "nohup", "bash" and other Unix on Windows command line utilities to allow use of the same sh() pipeline steps in builds directed to Linux agents and Windows agents.
Note: our build completes with SUCCESS without error or warnings on a Linux build agent. The build completes with SUCCESS and the same outputs (except the missing non-archived pom.xml files) as the Linux build but has the warning messages displayed below.
When running a withMaven build from a sh() build step on Windows:
withMaven(jdk: config['jdk'], maven: config['maven'], mavenLocalRepo: config['mavenLocalRepo'], mavenSettingsConfig: config['mavenSettingsConfig']) \{ sh('''\\ if [[ -e "pom.xml" ]]; then # Run Jenkins maven wrapper script using mvn in Unix bash or mvn.cmd in cmd.exe from Git for Windows bash if [[ -z "$COMSPEC" ]]; then cmd=(mvn) else cmd=("$COMSPEC" //c mvn.cmd) fi args=(--batch-mode -U -V --settings "$MVN_SETTINGS" clean install -P "$BUILD_PROFILE" \\ "-DxlDeployServerAddress=$XLDEPLOY_SERVER_ADDRESS" "-DxlDeployPort=$XLDEPLOY_PORT" \\ "-DxlDeploySecured=$XLDEPLOY_SECURED" "-DbuildUrl=$BUILD_URL") eval $(printf " %q" "$\{cmd[@]}" "$\{args[@]}") fi''') }
We get the following error. Note that the path that is generated for the archived pom.xml file by the 'pipeline-maven-plugin' is in correct in that it duplicates the directory prefix (C:\Jenkins\workspace\EJBOSSDeployTestDev_develop-2OFPXUJSF6HFU25YUKSWFWG43K6VCJBQJOLEUCRP2WYWTF57AETQ) twice. See below:
ERROR: [withMaven] WARNING Exception processing the logs generated by the Jenkins Maven Event Spy C:\Jenkins\workspace\EJBOSSDeployTestDev_develop-2OFPXUJSF6HFU25YUKSWFWG43K6VCJBQJOLEUCRP2WYWTF57AETQ@tmp\withMavenf5b2ab19\maven-spy-20170505-120300-155.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.io.IOException: Error writing to tar file from: C:\Jenkins\workspace\EJBOSSDeployTestDev_develop-2OFPXUJSF6HFU25YUKSWFWG43K6VCJBQJOLEUCRP2WYWTF57AETQ\C:\Jenkins\workspace\EJBOSSDeployTestDev_develop-2OFPXUJSF6HFU25YUKSWFWG43K6VCJBQJOLEUCRP2WYWTF57AETQ\BREJBOSSDeployTestDevWeb\pom.xml at hudson.FilePath.copyRecursiveTo(FilePath.java:2215) 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.io.IOException: Error writing to tar file from: C:\Jenkins\workspace\EJBOSSDeployTestDev_develop-2OFPXUJSF6HFU25YUKSWFWG43K6VCJBQJOLEUCRP2WYWTF57AETQ\C:\Jenkins\workspace\EJBOSSDeployTestDev_develop-2OFPXUJSF6HFU25YUKSWFWG43K6VCJBQJOLEUCRP2WYWTF57AETQ\BREJBOSSDeployTestDevWeb\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:2213) ... 27 more Caused by: java.io.IOException: Error writing to tar file from: C:\Jenkins\workspace\EJBOSSDeployTestDev_develop-2OFPXUJSF6HFU25YUKSWFWG43K6VCJBQJOLEUCRP2WYWTF57AETQ\C:\Jenkins\workspace\EJBOSSDeployTestDev_develop-2OFPXUJSF6HFU25YUKSWFWG43K6VCJBQJOLEUCRP2WYWTF57AETQ\BREJBOSSDeployTestDevWeb\pom.xml at hudson.util.io.TarArchiver.visit(TarArchiver.java:110) at hudson.util.DirScanner.scanSingle(DirScanner.java:49) at hudson.FilePath$ExplicitlySpecifiedDirScanner.scan(FilePath.java:2804)| at hudson.FilePath.writeToTar(FilePath.java:2251) at hudson.FilePath.access$2100(FilePath.java:195) at hudson.FilePath$45.invoke(FilePath.java:2194) at hudson.FilePath$45.invoke(FilePath.java:2190) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2731) 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(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at hudson.remoting.Engine$1$1.run(Engine.java:94) at java.lang.Thread.run(Thread.java:745) at ......remote call to JNLP4-connect connection from hlbwbdgtd101.corp.standard.com/192.168.137.149:50719(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 Caused by: java.io.FileNotFoundException: C:\Jenkins\workspace\EJBOSSDeployTestDev_develop-2OFPXUJSF6HFU25YUKSWFWG43K6VCJBQJOLEUCRP2WYWTF57AETQ\C:\Jenkins\workspace\EJBOSSDeployTestDev_develop-2OFPXUJSF6HFU25YUKSWFWG43K6VCJBQJOLEUCRP2WYWTF57AETQ\BREJBOSSDeployTestDevWeb\pom.xml (The filename, directory name, or volume label syntax is incorrect) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.<init>(FileInputStream.java:138) at hudson.util.io.TarArchiver.visit(TarArchiver.java:103) at hudson.util.DirScanner.scanSingle(DirScanner.java:49) at hudson.FilePath$ExplicitlySpecifiedDirScanner.scan(FilePath.java:2804) at hudson.FilePath.writeToTar(FilePath.java:2251) at hudson.FilePath.access$2100(FilePath.java:195) at hudson.FilePath$45.invoke(FilePath.java:2194) at hudson.FilePath$45.invoke(FilePath.java:2190) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2731) 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(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at hudson.remoting.Engine$1$1.run(Engine.java:94) ... 1 more
- duplicates
-
JENKINS-43617 Pipeline maven error: java.nio.file.InvalidPathException: Illegal char <:>
- Closed