Skip to content
Permalink
Browse files
Merge pull request #112 from jenkinsci/JENKINS-48362
[JENKINS-48362] Support whitespace in Maven installation path
  • Loading branch information
Cyrille Le Clerc committed Dec 4, 2017
2 parents 2da1dbb + 4de8753 commit f84632b81004e0a5c4a7455d097f93b65601bc28
Showing with 2 additions and 2 deletions.
  1. +2 −2 jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepExecution.java
@@ -559,13 +559,13 @@ private String generateMavenWrapperScriptContent(@Nonnull FilePath mvnExec, @Non
String lineSep = "\n";
script.append("#!/bin/sh -e").append(lineSep);
script.append("echo ----- withMaven Wrapper script -----").append(lineSep);
script.append(mvnExec.getRemote() + " " + mavenConfig + " \"$@\"").append(lineSep);
script.append("\"" + mvnExec.getRemote() + "\" " + mavenConfig + " \"$@\"").append(lineSep);

} else { // Windows
String lineSep = "\r\n";
script.append("@echo off").append(lineSep);
script.append("echo ----- withMaven Wrapper script -----").append(lineSep);
script.append(mvnExec.getRemote() + " " + mavenConfig + " %*").append(lineSep);
script.append("\"" + mvnExec.getRemote() + "\" " + mavenConfig + " %*").append(lineSep);
}

LOGGER.log(Level.FINER, "Generated Maven wrapper script: \n{0}", script);

0 comments on commit f84632b

Please sign in to comment.