本文整理了Java中org.apache.tools.ant.taskdefs.Java.addSysproperty()
方法的一些代码示例,展示了Java.addSysproperty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Java.addSysproperty()
方法的具体详情如下:
包路径:org.apache.tools.ant.taskdefs.Java
类名称:Java
方法名:addSysproperty
[英]Add a system property.
[中]添加系统属性。
代码示例来源:origin: org.apache.ant/ant
File libdir = new File(websphereHome, "lib");
var.setValue(libdir.getAbsolutePath());
javaTask.addSysproperty(var);
代码示例来源:origin: com.atlassian.maven.plugins/maven-amps-plugin
/**
* 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()));
}
}
代码示例来源:origin: com.atlassian.maven.plugins/amps-maven-plugin
/**
* 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()));
}
}
代码示例来源:origin: codehaus-cargo/cargo
/**
* {@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);
}
}
代码示例来源:origin: org.apache.geronimo.genesis.plugins/plugin-support
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);
}
代码示例来源:origin: org.codehaus.mojo/plugin-support
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);
}
代码示例来源:origin: org.apache.geronimo.genesis.plugins/plugin-support
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);
}
代码示例来源:origin: org.apache.geronimo.genesis.plugins/plugin-support
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);
}
代码示例来源:origin: org.codehaus.mojo/plugin-support
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);
}
代码示例来源:origin: org.codehaus.mojo/plugin-support
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);
}
代码示例来源:origin: org.codehaus.mojo/plugin-support
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);
}
代码示例来源:origin: org.apache.geronimo.genesis.plugins/plugin-support
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);
}
代码示例来源:origin: net.sourceforge.cobertura/cobertura
/**
* 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);
}
}
代码示例来源:origin: net.sourceforge.purrpackage/purrpackage
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);
}
}
代码示例来源:origin: christ66/cobertura
/**
* 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);
}
}
代码示例来源:origin: org.jclouds/jclouds-antcontrib
@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);
}
}
代码示例来源:origin: torquebox/jruby-maven-plugins
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" );
代码示例来源:origin: org.fornax.toolsupport/fornax-oaw-m2-plugin
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;
}
代码示例来源:origin: Chorus-bdd/Chorus
sysp.setKey("log4j.configuration");
sysp.setValue(value);
javaTask.addSysproperty(sysp);
代码示例来源:origin: martinpaljak/ant-javacard
jchome.setKey("jc.home");
jchome.setValue(jckit.getRoot().toString());
j.addSysproperty(jchome);
} else {
j.setClassname("com.sun.javacard.converter.Converter");
内容来源于网络,如有侵权,请联系作者删除!