Skip to content

Commit

Permalink
Merge pull request #112 from jenkinsci/JENKINS-48362
Browse files Browse the repository at this point in the history
[JENKINS-48362] Support whitespace in Maven installation path
  • Loading branch information
Cyrille Le Clerc authored Dec 4, 2017
2 parents 2da1dbb + 4de8753 commit f84632b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f84632b

Please sign in to comment.