congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Environment$Variable
Code IndexAdd Tabnine to your IDE (free)

How to use
Environment$Variable
in
org.apache.tools.ant.types

Best Java code snippets using org.apache.tools.ant.types.Environment$Variable (Showing top 20 results out of 396)

origin: geotools/geotools

task.setDir(dir);
task.createArg().setValue("-G");
Variable variable = new Variable();
variable.setKey("PATH");
variable.setValue(PATH);
task.addEnv(variable);
origin: org.apache.ant/ant

/**
 * Cache the system properties and set the system properties to the
 * new values.
 * @throws BuildException if Security prevented this operation.
 */
public void setSystem() throws BuildException {
  try {
    sys = System.getProperties();
    Properties p = new Properties();
    for (String name : sys.stringPropertyNames()) {
      String value = sys.getProperty(name);
      if (value != null) {
        p.put(name, value);
      }
    }
    p.putAll(mergePropertySets());
    for (Environment.Variable v : variables) {
      v.validate();
      p.put(v.getKey(), v.getValue());
    }
    System.setProperties(p);
  } catch (SecurityException e) {
    throw new BuildException("Cannot modify system properties", e);
  }
}
origin: maven-nar/nar-maven-plugin

 && getLinker().getName().equals("msvc") && !getLinker().getVersion(this).startsWith("6.")) {
final String[] env = new String[] {
 "PATH=" + getMsvc().getPathVariable().getValue()
};
final String libType = library.getType();
origin: randomizedtesting/randomizedtesting

Environment.Variable v = new Environment.Variable();
v.setKey(SYSPROP_TESTMETHOD());
v.setValue(testMethodFilter);
getCommandline().addSysproperty(v);
 if (SysGlobals.SYSPROP_TESTFILTER().equals(v.getKey())) {
  try {
   Node root = new FilterExpressionParser().parse(v.getValue());
   log("Parsed test filtering expression: " + root.toExpression(), Project.MSG_INFO);
  } catch (Exception e) {
   log("Could not parse filtering expression: " + v.getValue(), e, Project.MSG_WARN);
origin: com.carrotsearch.randomizedtesting/junit4-ant

Environment.Variable v = new Environment.Variable();
v.setKey(SYSPROP_TESTMETHOD());
v.setValue(testMethodFilter);
getCommandline().addSysproperty(v);
 if (SysGlobals.SYSPROP_TESTFILTER().equals(v.getKey())) {
  try {
   Node root = new FilterExpressionParser().parse(v.getValue());
   log("Parsed test filtering expression: " + root.toExpression(), Project.MSG_INFO);
  } catch (Exception e) {
   log("Could not parse filtering expression: " + v.getValue(), e, Project.MSG_WARN);
origin: org.hudsonci.plugins/cvs

Environment.Variable var = new Environment.Variable();
var.setKey("CVS_CLIENT_PORT");
var.setValue(String.valueOf(port));
env.addVariable(var);
  Environment.Variable var = new Environment.Variable();
  var.setKey("CVS_PASSFILE");
  var.setValue(String.valueOf(passFile));
  env.addVariable(var);
  log("Using cvs passfile: " + String.valueOf(passFile),
Environment.Variable var = new Environment.Variable();
var.setKey("CVS_RSH");
var.setValue(String.valueOf(cvsRsh));
env.addVariable(var);
origin: org.jvnet.hudson.plugins/cvs

Environment.Variable var = new Environment.Variable();
var.setKey("CVS_CLIENT_PORT");
var.setValue(String.valueOf(port));
env.addVariable(var);
  Environment.Variable var = new Environment.Variable();
  var.setKey("CVS_PASSFILE");
  var.setValue(String.valueOf(passFile));
  env.addVariable(var);
  log("Using cvs passfile: " + String.valueOf(passFile),
Environment.Variable var = new Environment.Variable();
var.setKey("CVS_RSH");
var.setValue(String.valueOf(cvsRsh));
env.addVariable(var);
origin: org.rundeck/rundeck-core

channel.setEnv(env.getKey(), env.getValue());
origin: org.metaeffekt.dcc/dcc-commons

final Variable antHomeVar = new Variable();
antHomeVar.setKey("ANT_HOME");
antHomeVar.setValue(antHome.getPath());
exec.addEnv(antHomeVar);
final Variable javaHomeVar = new Variable();
javaHomeVar.setKey("JAVA_HOME");
javaHomeVar.setValue(System.getProperty("java.home"));
exec.addEnv(javaHomeVar);
    final Variable antOptsVar = new Variable();
    antOptsVar.setKey("ANT_OPTS");
    antOptsVar.setValue("-Dlog4j.configurationFile=" + log4jConfig);
    exec.addEnv(antOptsVar);
  } else {
origin: org.jboss.unit/jboss-unit-tooling-core

Environment.Variable pluginProperty = new Environment.Variable();
pluginProperty.setKey("org.jboss.logging.Logger.pluginClass");
pluginProperty.setValue("org.jboss.logging.jdk.JDK14LoggerPlugin");
java.addSysproperty(pluginProperty);
Environment.Variable julProperty = new Environment.Variable();
julProperty.setKey("java.util.logging.config.file");
julProperty.setValue("logging.properties");
java.addSysproperty(julProperty);
Environment.Variable javaDotCompilerProperty = new Environment.Variable();
javaDotCompilerProperty.setKey("java.compiler");
javaDotCompilerProperty.setValue("NONE");
java.addSysproperty(javaDotCompilerProperty);
StringBuilder jvmArgs = new StringBuilder();
origin: org.geoserver.extension/wps-core

if (cacheMax != null) {
  int gdalCacheMaxMemory = Integer.parseInt(cacheMax); // Only for validation
  Variable var = new Variable();
  var.setKey(GRKeys.GDAL_CACHEMAX);
  var.setValue(cacheMax);
  envVariables.add(var);
if (directory.exists() && directory.isDirectory()
    && ((key.equalsIgnoreCase(GRKeys.GDAL_DATA) && directory.canRead()) || directory.canWrite())) {
  Variable var = new Variable();
  var.setKey(key);
  var.setValue(path);
  envVariables.add(var);
Variable var = new Variable();
var.setKey(key);
var.setValue(param);
envVariables.add(var);
origin: org.jboss.aop/jboss-aop

java.setTaskName("aopc");
Environment.Variable optimize = new Environment.Variable();
optimize.setKey(SYS_OPTIMIZED);
optimize.setValue(String.valueOf(optimized));
java.addSysproperty(optimize);
origin: org.jboss.aop/jboss-aop

if (var.getKey().equals("java.io.tmpdir"))
  System.setProperty("java.io.tmpdir", var.getValue());
origin: martinpaljak/ant-javacard

  j.setClassname("com.sun.javacard.converter.Main");
  Variable jchome = new Variable();
  jchome.setKey("jc.home");
  jchome.setValue(jckit.getRoot().toString());
  j.addSysproperty(jchome);
} else {
origin: org.rhq/rhq-core-dbutils

List<String> nonexistent_sysprops = new ArrayList<String>(); // keys that didn't exist in system properties
for (Environment.Variable env_var : sysProps) {
  String old_value = System.setProperty(env_var.getKey(), env_var.getValue());
  if (old_value == null) {
    nonexistent_sysprops.add(env_var.getKey());
  } else {
    old_sysprops.put(env_var.getKey(), old_value);
origin: torquebox/jruby-maven-plugins

Variable v = new Variable();
v.setKey(entry.getKey());
v.setValue(entry.getValue());
java.addEnv(v);
Variable v = new Variable();
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") ) :
origin: com.carrotsearch.randomizedtesting/junit4-ant

try {
 String tempDir = commandline.getSystemProperties().getVariablesVector().stream()
  .filter(v -> v.getKey().equals("java.io.tmpdir"))
  .map(v -> v.getValue())
  .findAny()
  .orElse(null);
 Variable v = new Variable();
 v.setKey(CHILDVM_SYSPROP_CWD);
 v.setFile(cwd.toAbsolutePath().normalize().toFile());
 commandline.addSysproperty(v);
 v = new Variable();
 v.setKey(SYSPROP_TEMPDIR);
 v.setFile(getTempDir().toAbsolutePath().normalize().toFile());
 commandline.addSysproperty(v);
 v = new Variable();
 v.setKey(SysGlobals.CHILDVM_SYSPROP_JVM_ID);
 v.setValue(Integer.toString(slaveInfo.id));
 commandline.addSysproperty(v);
 v = new Variable();
 v.setKey(SysGlobals.CHILDVM_SYSPROP_JVM_COUNT);
 v.setValue(Integer.toString(slaveInfo.slaves));
 commandline.addSysproperty(v);
origin: Chorus-bdd/Chorus

Environment.Variable sysp = new Environment.Variable();
sysp.setKey("log4j.configuration");
sysp.setValue(value);
javaTask.addSysproperty(sysp);
origin: SAP/vulnerability-assessment-tool

final String value = this.agentOptions.get(key);
if (value != null && !value.isEmpty()) {
  Environment.Variable variable = new Environment.Variable();
  variable.setKey(key);
  variable.setValue(value);
  commandlineJava.addSysproperty(variable);
origin: randomizedtesting/randomizedtesting

try {
 String tempDir = commandline.getSystemProperties().getVariablesVector().stream()
  .filter(v -> v.getKey().equals("java.io.tmpdir"))
  .map(v -> v.getValue())
  .findAny()
  .orElse(null);
 Variable v = new Variable();
 v.setKey(CHILDVM_SYSPROP_CWD);
 v.setFile(cwd.toAbsolutePath().normalize().toFile());
 commandline.addSysproperty(v);
 v = new Variable();
 v.setKey(SYSPROP_TEMPDIR);
 v.setFile(getTempDir().toAbsolutePath().normalize().toFile());
 commandline.addSysproperty(v);
 v = new Variable();
 v.setKey(SysGlobals.CHILDVM_SYSPROP_JVM_ID);
 v.setValue(Integer.toString(slaveInfo.id));
 commandline.addSysproperty(v);
 v = new Variable();
 v.setKey(SysGlobals.CHILDVM_SYSPROP_JVM_COUNT);
 v.setValue(Integer.toString(slaveInfo.slaves));
 commandline.addSysproperty(v);
org.apache.tools.ant.typesEnvironment$Variable

Javadoc

representation of a single env value

Most used methods

  • <init>
    Constructor for variable
  • setKey
    set the key
  • setValue
    set the value
  • getValue
    value accessor
  • getKey
    key accessor
  • setFile
    get the absolute path of a file and assign it to the value
  • setPath
    stringify path and assign to the value. The value will contain all path elements separated by the ap
  • getContent
    get the assignment string This is not ready for insertion into a property file without following the
  • validate
    checks whether all required attributes have been specified.

Popular in Java

  • Parsing JSON documents to java classes using gson
  • setRequestProperty (URLConnection)
  • getSupportFragmentManager (FragmentActivity)
  • setContentView (Activity)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Option (scala)
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now