提交 71de79e2 编写于 作者: S stephenconnolly

Issue number:

Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@3339 71c3de6d-444a-0410-be80-ed276b4c234a
上级 6cd30869
......@@ -141,8 +141,17 @@ public class Maven extends Builder {
}
Map<String,String> env = build.getEnvVars();
if(ai!=null)
if(ai!=null) {
// if somebody has use M2_HOME they will get a classloading error
// when M2_HOME points to a different version of Maven2 from
// MAVEN_HOME (as Maven 2 gives M2_HOME priority)
//
// The other solution would be to set M2_HOME if we are calling Maven2
// and MAVEN_HOME for Maven1 (only of use for strange people that
// are calling Maven2 from Maven1)
env.remove("M2_HOME");
env.put("MAVEN_HOME",ai.getMavenHome());
}
// just as a precaution
// see http://maven.apache.org/continuum/faqs.html#how-does-continuum-detect-a-successful-build
env.put("MAVEN_TERMINATE_CMD","on");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册