Skip to content
Permalink
Browse files

[JENKINS-48362] Support whitespace in Maven installation path

  • Loading branch information
Cyrille Le Clerc
Cyrille Le Clerc committed Dec 4, 2017
1 parent 2da1dbb commit 4de87539abb92bd817ae37a3edeba0e85dab4477
@@ -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 4de8753

Please sign in to comment.
You can’t perform that action at this time.