mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-101546 Maven surefire environment variables
This commit is contained in:
+9
@@ -17,6 +17,7 @@
|
||||
package com.intellij.execution.configurations;
|
||||
|
||||
import com.intellij.execution.configuration.EnvironmentVariablesComponent;
|
||||
import gnu.trove.THashMap;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.HashMap;
|
||||
@@ -48,6 +49,14 @@ public class SimpleProgramParameters {
|
||||
return myEnv;
|
||||
}
|
||||
|
||||
public String addEnv(String name, String value) {
|
||||
if (myEnv == null) {
|
||||
myEnv = new THashMap<String, String>();
|
||||
}
|
||||
|
||||
return myEnv.put(name, value);
|
||||
}
|
||||
|
||||
public void setEnv(final Map<String, String> env) {
|
||||
myEnv = env;
|
||||
}
|
||||
|
||||
@@ -67,5 +67,15 @@ public class MavenJUnitPatcher extends JUnitPatcher {
|
||||
javaParameters.getVMParametersList().addProperty(propertyName, value);
|
||||
}
|
||||
}
|
||||
|
||||
Element environmentVariables = config.getChild("environmentVariables");
|
||||
if (environmentVariables != null) {
|
||||
for (Element element : (List<Element>)environmentVariables.getChildren()) {
|
||||
String variableName = element.getName();
|
||||
String value = element.getValue();
|
||||
|
||||
javaParameters.addEnv(variableName, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user