提交 a0b0d6bf 编写于 作者: K kohsuke

applied a patch from Nigel Magney...

applied a patch from Nigel Magney (http://www.nabble.com/-patch--allow-M2-projects-to-use-environment-variables-in-options-tt15061026.html)


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@6865 71c3de6d-444a-0410-be80-ed276b4c234a
上级 ec4f9c86
......@@ -135,7 +135,14 @@ final class MavenProcessFactory implements ProcessCache.Factory {
}
public String getMavenOpts() {
return mms.getMavenOpts();
String opts = mms.getMavenOpts();
if (opts == null)
return null;
for (String key : envVars.keySet())
opts = opts.replace("$" + key, envVars.get(key));
return opts;
}
public MavenInstallation getMavenInstallation() {
......
......@@ -2,4 +2,7 @@
Specify JVM options needed when launching Maven as an external process.
Also see <a href="http://maven.apache.org/maven-1.x/reference/command-line.html">MAVEN_OPTS documentation</a>
(even though this is for Maven 1.x it still applies to Maven 2.x)
<p>
Shell-like environment variable expansions work in this field, by using the <tt>$VARIABLE</tt> syntax.
</div>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册