File libdir = new File(websphereHome, "lib"); var.setValue(libdir.getAbsolutePath()); javaTask.addSysproperty(var);
/** * Add system properties to the Ant java command used to start the container. * * @param java the java command that will start the container */ private void addSystemProperties(Java java, Map<String, String> systemProperties) { for (Map.Entry<String, String> prop : systemProperties.entrySet()) { java.addSysproperty(antUtils.createSysProperty(prop.getKey(), prop.getValue())); } }
/** * Add system properties to the Ant java command used to start the container. * * @param java the java command that will start the container */ private void addSystemProperties(Java java, Map<String, String> systemProperties) { for (Map.Entry<String, String> prop : systemProperties.entrySet()) { java.addSysproperty(antUtils.createSysProperty(prop.getKey(), prop.getValue())); } }
/** * {@inheritDoc} */ @Override public void setSystemProperty(String name, String value) { if (name != null && !name.isEmpty()) { Environment.Variable var = new Environment.Variable(); var.setKey(name); var.setValue(value != null ? value : ""); this.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); }
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); }
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); }
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); }
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); }
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); }
/** * Used to transfer the net.sourceforge.cobertura.datafile property to a JVM * that is about to be forked. * <p/> * This is confusing, but it's required by our functional test. * What happens is, we have a JUnit test that runs ant to * instrument some classes. When the instrumentation is running, * we want to get the coverage info that is created by exercising * our instrumentation classes. * <p/> * So we pass in two different coverage files: * 1. The coverage data file command line parameter. This tells * the instrument task where to write the new coverage data. * 2. The coverage data system property. This tells the * instrumentation inside the instrumented classes where to * keep track of the line hit counts, etc. * * @param task The Java task that will do the forking. */ static void transferCoberturaDataFileProperty(Java task) { String coberturaProperty = System.getProperty(COBERTURA_DATAFILE); if (coberturaProperty != null) { Variable sysproperty = new Variable(); sysproperty.setKey(COBERTURA_DATAFILE); sysproperty.setValue(coberturaProperty); task.addSysproperty(sysproperty); } }
void transferCoberturaDataFileProperty(Java task) { String coberturaProperty = coberturaPropertyValue(); if (coberturaProperty != null) { Variable sysproperty = new Variable(); sysproperty.setKey( COB_PROP_KEY); sysproperty.setValue(coberturaProperty); task.addSysproperty(sysproperty); } }
/** * Used to transfer the net.sourceforge.cobertura.datafile property to a JVM * that is about to be forked. * <p/> * This is confusing, but it's required by our functional test. * What happens is, we have a JUnit test that runs ant to * instrument some classes. When the instrumentation is running, * we want to get the coverage info that is created by exercising * our instrumentation classes. * <p/> * So we pass in two different coverage files: * 1. The coverage data file command line parameter. This tells * the instrument task where to write the new coverage data. * 2. The coverage data system property. This tells the * instrumentation inside the instrumented classes where to * keep track of the line hit counts, etc. * * @param task The Java task that will do the forking. */ static void transferCoberturaDataFileProperty(Java task) { String coberturaProperty = System .getProperty("net.sourceforge.cobertura.datafile"); if (coberturaProperty != null) { Variable sysproperty = new Variable(); sysproperty.setKey("net.sourceforge.cobertura.datafile"); sysproperty.setValue(coberturaProperty); task.addSysproperty(sysproperty); } }
@Override public void addSysproperty(Variable sysp) { if (sysp.getKey().startsWith("sshjava.shift.")) { shiftMap.put(sysp.getKey().replaceFirst("sshjava.shift.", ""), sysp.getValue()); } else if (sysp.getKey().startsWith("sshjava.replace.")) { replace.put(sysp.getKey().replaceFirst("sshjava.replace.", ""), sysp.getValue()); } else if (sysp.getKey().equals("sshjava.id")) { setId(sysp.getValue()); } else if (sysp.getKey().equals("sshjava.host")) { setHost(sysp.getValue()); } else if (sysp.getKey().equals("sshjava.port") && !sysp.getValue().equals("")) { setPort(Integer.parseInt(sysp.getValue())); } else if (sysp.getKey().equals("sshjava.username")) { setUsername(sysp.getValue()); } else if (sysp.getKey().equals("sshjava.password") && !sysp.getValue().equals("")) { setPassword(sysp.getValue()); } else if (sysp.getKey().equals("sshjava.keyfile") && !sysp.getValue().equals("")) { setKeyfile(sysp.getValue()); } else if (sysp.getKey().equals("sshjava.remotebase")) { setRemotebase(new File(sysp.getValue())); } else { super.addSysproperty(sysp); } }
v.setKey( "jruby.home" ); v.setValue( System.getProperty( "jruby.home" ) ); java.addSysproperty( v ); File lib = System.getProperty("jruby.lib") != null ? new File( System.getProperty("jruby.lib") ) : new File( System.getProperty("jruby.home"), "lib" );
public JavaTaskBuilder withJvmSettings(JvmSettings jvmSettings) { if (jvmSettings != null) { javaTask.setFork(jvmSettings.isFork()); for (String jvmArg : jvmSettings.getJvmArgs()) { Commandline.Argument newArg = javaTask.createJvmarg(); newArg.setLine(jvmArg); } if (jvmSettings.isFork() && jvmSettings.isCopySysProperties()) { javaTask.setCloneVm(true); } else if (jvmSettings.isFork() && System.getProperty(CHANGED_FILES_PROPERTY) != null) { Variable var = new Variable(); var.setKey(CHANGED_FILES_PROPERTY); var.setValue(System.getProperty(CHANGED_FILES_PROPERTY)); javaTask.addSysproperty(var); } for (Variable var : getVariables(jvmSettings.getEnvProperties())) { javaTask.addEnv(var); } } return this; }
sysp.setKey("log4j.configuration"); sysp.setValue(value); javaTask.addSysproperty(sysp);
jchome.setKey("jc.home"); jchome.setValue(jckit.getRoot().toString()); j.addSysproperty(jchome); } else { j.setClassname("com.sun.javacard.converter.Converter");