congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
CommandLineUtils.getSystemEnvVars
Code IndexAdd Tabnine to your IDE (free)

How to use
getSystemEnvVars
method
in
org.apache.maven.shared.utils.cli.CommandLineUtils

Best Java code snippets using org.apache.maven.shared.utils.cli.CommandLineUtils.getSystemEnvVars (Showing top 5 results out of 315)

origin: fabric8io/docker-maven-plugin

  private FixedStringSearchInterpolator createEnvInterpolator() {
    PrefixedPropertiesValueSource envProps = new PrefixedPropertiesValueSource(Collections.singletonList("env."),
                                          CommandLineUtils.getSystemEnvVars(false), true );
    return FixedStringSearchInterpolator.create( envProps );
  }
}
origin: org.apache.maven.shared/maven-shared-utils

/**
 * Gets the shell environment variables for this process. Note that the returned mapping from variable names to
 * values will always be case-sensitive regardless of the platform, i.e. <code>getSystemEnvVars().get("path")</code>
 * and <code>getSystemEnvVars().get("PATH")</code> will in general return different values. However, on platforms
 * with case-insensitive environment variables like Windows, all variable names will be normalized to upper case.
 *
 * @return The shell environment variables, can be empty but never <code>null</code>.
 * @see System#getenv() System.getenv() API, new in JDK 5.0, to get the same result
 *      <b>since 2.0.2 System#getenv() will be used if available in the current running jvm.</b>
 */
public static Properties getSystemEnvVars()
{
  return getSystemEnvVars( !Os.isFamily( Os.FAMILY_WINDOWS ) );
}
origin: org.apache.maven.shared/maven-verifier

private void findDefaultMavenHome()
  throws VerificationException
{
  defaultClasspath = System.getProperty( "maven.bootclasspath" );
  defaultClassworldConf = System.getProperty( "classworlds.conf" );
  defaultMavenHome = System.getProperty( "maven.home" );
  if ( defaultMavenHome == null )
  {
    Properties envVars = CommandLineUtils.getSystemEnvVars();
    defaultMavenHome = envVars.getProperty( "M2_HOME" );
  }
  if ( defaultMavenHome == null )
  {
    File f = new File( System.getProperty( "user.home" ), "m2" );
    if ( new File( f, "bin/mvn" ).isFile() )
    {
      defaultMavenHome = f.getAbsolutePath();
    }
  }
}
origin: org.apache.maven.shared/maven-shared-utils

/**
 * Add system environment variables
 */
public void addSystemEnvironment()
{
  Properties systemEnvVars = CommandLineUtils.getSystemEnvVars();
  for ( Object o : systemEnvVars.keySet() )
  {
    String key = (String) o;
    if ( !envVars.containsKey( key ) )
    {
      addEnvironment( key, systemEnvVars.getProperty( key ) );
    }
  }
}
origin: org.apache.maven.plugins/maven-assembly-plugin

private FixedStringSearchInterpolator createEnvInterpolator()
{
  PrefixedPropertiesValueSource envProps = new PrefixedPropertiesValueSource( Collections.singletonList( "env." ),
                                        CommandLineUtils.getSystemEnvVars(
                                          false ), true );
  return FixedStringSearchInterpolator.create( envProps );
}
org.apache.maven.shared.utils.cliCommandLineUtilsgetSystemEnvVars

Javadoc

Gets the shell environment variables for this process. Note that the returned mapping from variable names to values will always be case-sensitive regardless of the platform, i.e. getSystemEnvVars().get("path") and getSystemEnvVars().get("PATH") will in general return different values. However, on platforms with case-insensitive environment variables like Windows, all variable names will be normalized to upper case.

Popular methods of CommandLineUtils

  • executeCommandLine
  • translateCommandline
  • ensureCaseSensitivity
  • executeCommandLineAsCallable
  • toString

Popular in Java

  • Making http post requests using okhttp
  • setRequestProperty (URLConnection)
  • getSupportFragmentManager (FragmentActivity)
  • requestLocationUpdates (LocationManager)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Top PhpStorm 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