/** * Add the referenced property set as system properties for the TestNG JVM. * * @param sysPropertySet A PropertySet of system properties. */ public void addConfiguredPropertySet(PropertySet sysPropertySet) { Properties properties = sysPropertySet.getProperties(); log(properties.keySet().size() + " properties found in nested propertyset", Project.MSG_VERBOSE); for (Object propKeyObj : properties.keySet()) { String propKey = (String) propKeyObj; Environment.Variable sysProp = new Environment.Variable(); sysProp.setKey(propKey); if (properties.get(propKey) instanceof String) { String propVal = (String) properties.get(propKey); sysProp.setValue(propVal); getJavaCommand().addSysproperty(sysProp); log("Added system property " + propKey + " with value " + propVal, Project.MSG_VERBOSE); } else { log("Ignoring non-String property " + propKey, Project.MSG_WARN); } } }
/** * Add the referenced property set as system properties for the TestNG JVM. * * @param sysPropertySet A PropertySet of system properties. */ public void addConfiguredPropertySet(PropertySet sysPropertySet) { Properties properties = sysPropertySet.getProperties(); log( properties.keySet().size() + " properties found in nested propertyset", Project.MSG_VERBOSE); for (Object propKeyObj : properties.keySet()) { String propKey = (String) propKeyObj; Environment.Variable sysProp = new Environment.Variable(); sysProp.setKey(propKey); if (properties.get(propKey) instanceof String) { String propVal = (String) properties.get(propKey); sysProp.setValue(propVal); getJavaCommand().addSysproperty(sysProp); log("Added system property " + propKey + " with value " + propVal, Project.MSG_VERBOSE); } else { log("Ignoring non-String property " + propKey, Project.MSG_WARN); } } }
Environment.Variable var = new Environment.Variable(); var.setKey("CVS_CLIENT_PORT"); var.setValue(String.valueOf(port)); var = new Environment.Variable(); var.setKey("CVS_PSERVER_PORT"); var.setValue(String.valueOf(port)); Environment.Variable var = new Environment.Variable(); var.setKey("CVS_PASSFILE"); var.setValue(String.valueOf(passFile)); Environment.Variable var = new Environment.Variable(); var.setKey("CVS_RSH"); var.setValue(String.valueOf(cvsRsh));
protected void setSystemProperty(final Java java, final String name, final File value) { assert java != null; assert name != null; assert value != null; Environment.Variable var = new Environment.Variable(); var.setKey(name); var.setFile(value); java.addSysproperty(var); }
protected void setSystemProperty(final Java java, final String name, final File value) { assert java != null; assert name != null; assert value != null; Environment.Variable var = new Environment.Variable(); var.setKey(name); var.setFile(value); java.addSysproperty(var); }
private List<Variable> getVariables(Properties props) { ArrayList<Variable> vars = new ArrayList<Variable>(); for (Entry<Object, Object> entry : props.entrySet()) { Variable var = new Variable(); var.setKey(entry.getKey().toString()); var.setValue(String.valueOf(entry.getValue())); vars.add(var); } return vars; }
public void setSystemProperty(final Java java, final String name, final String value) { assert java != null; assert name != null; assert value != null; Environment.Variable var = new Environment.Variable(); var.setKey(name); var.setValue(value); java.addSysproperty(var); }
/** * Create an Ant {@link Variable} configured with a simple value. * @param key variable name * @param value variable value * @return a configured {@link Variable} */ public static Environment.Variable createVariable(final String key, final String value) { Environment.Variable variable = new Environment.Variable(); variable.setKey(key); variable.setValue(value); return variable; }
protected void setSystemProperty(final Java java, final String name, final String value) { assert java != null; assert name != null; assert value != null; Environment.Variable var = new Environment.Variable(); var.setKey(name); var.setValue(value); java.addSysproperty(var); }
public Variable getPathVariable() { if (paths.isEmpty()) return null; final Variable pathVariable = new Variable(); pathVariable.setKey("PATH"); pathVariable.setValue(StringUtils.join(paths.iterator(), File.pathSeparator)); return pathVariable; }
public void setSystemProperty(final Java java, final String name, final File value) { assert java != null; assert name != null; assert value != null; Environment.Variable var = new Environment.Variable(); var.setKey(name); var.setFile(value); java.addSysproperty(var); }
public void setSystemProperty(final Java java, final String name, final String value) { assert java != null; assert name != null; assert value != null; Environment.Variable var = new Environment.Variable(); var.setKey(name); var.setValue(value); java.addSysproperty(var); }
/** * Create an Ant {@link Variable} configured with an absolute File path as value. * @param key variable name * @param value variable value * @return a configured {@link Variable} */ public static Environment.Variable createVariable(final String key, final File value) { Environment.Variable variable = new Environment.Variable(); variable.setKey(key); variable.setFile(value); return variable; }
public void setSystemProperty(final Java java, final String name, final File value) { assert java != null; assert name != null; assert value != null; Environment.Variable var = new Environment.Variable(); var.setKey(name); var.setFile(value); java.addSysproperty(var); }
protected void setSystemProperty(final Java java, final String name, final String value) { assert java != null; assert name != null; assert value != null; Environment.Variable var = new Environment.Variable(); var.setKey(name); var.setValue(value); java.addSysproperty(var); }
task.setDir(dir); task.createArg().setValue("-G"); Variable variable = new Variable(); variable.setKey("PATH"); variable.setValue(PATH);
Environment.Variable var = new Environment.Variable();
private void delegateCommandSystemProperties() { // Iterate over command-line args and pass them through as sysproperty // exclude any built-in properties that start with "ant." for (Object propKey : getProject().getUserProperties().keySet()) { String propName = (String) propKey; String propVal = getProject().getUserProperty(propName); if (propName.startsWith("ant.")) { log("Excluding ant property: " + propName + ": " + propVal, Project.MSG_DEBUG); } else { log("Including user property: " + propName + ": " + propVal, Project.MSG_DEBUG); Environment.Variable var = new Environment.Variable(); var.setKey(propName); var.setValue(propVal); addSysproperty(var); } } }
private void delegateCommandSystemProperties() { // Iterate over command-line args and pass them through as sysproperty // exclude any built-in properties that start with "ant." for (Object propKey : getProject().getUserProperties().keySet()) { String propName = (String) propKey; String propVal = getProject().getUserProperty(propName); if (propName.startsWith("ant.")) { log("Excluding ant property: " + propName + ": " + propVal, Project.MSG_DEBUG); } else { log("Including user property: " + propName + ": " + propVal, Project.MSG_DEBUG); Environment.Variable var = new Environment.Variable(); var.setKey(propName); var.setValue(propVal); addSysproperty(var); } } }