提交 21ad12ff 编写于 作者: K kohsuke

defined a system property to remove MAVEN_OPTS from Maven builds forked inside.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@34044 71c3de6d-444a-0410-be80-ed276b4c234a
上级 457315f4
......@@ -226,7 +226,7 @@ public class EnvVars extends TreeMap<String,String> {
private static EnvVars initMaster() {
EnvVars vars = new EnvVars(System.getenv());
vars.platform = Platform.current();
if(Main.isUnitTest)
if(Main.isUnitTest || Main.isDevelopmentMode)
// if unit test is launched with maven debug switch,
// we need to prevent forked Maven processes from seeing it, or else
// they'll hang
......
......@@ -183,6 +183,11 @@ public class Main {
*/
public static boolean isUnitTest = false;
/**
* Set to true if we are running inside "mvn hpi:run" or "mvn hudson-dev:run"
*/
public static boolean isDevelopmentMode = Boolean.getBoolean(Main.class.getName()+".development");
/**
* Time out for socket connection to Hudson.
*/
......
......@@ -204,6 +204,10 @@ THE SOFTWARE.
<name>hudson.model.UsageStatistics.disabled</name>
<value>true</value>
</systemProperty>
<systemProperty>
<name>hudson.Main.development</name>
<value>true</value>
</systemProperty>
</systemProperties>
</configuration>
</plugin>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册