Package software.amazon.smithy.cli
Enum EnvironmentVariable
- java.lang.Object
- 
- java.lang.Enum<EnvironmentVariable>
- 
- software.amazon.smithy.cli.EnvironmentVariable
 
 
- 
- All Implemented Interfaces:
- java.io.Serializable,- java.lang.Comparable<EnvironmentVariable>
 
 public enum EnvironmentVariable extends java.lang.Enum<EnvironmentVariable> Environment variables used by the Smithy CLI.
- 
- 
Enum Constant SummaryEnum Constants Enum Constant Description FORCE_COLORIf set to any value, force enables the support of ANSI colors in the output.NO_COLORIf set to any value, disable ANSI colors in the output.SMITHY_DEPENDENCY_MODEConfigures if and how the Smithy CLI handles dependencies declared in smithy-build.json files.SMITHY_MAVEN_CACHEA custom location for the Maven local repository cache.SMITHY_MAVEN_REPOSA pipe-delimited list of Maven repositories to use.SMITHY_PROXY_CREDENTIALSUsed to determine a proxy credentials to use for Maven dependency resolution through a proxy.SMITHY_PROXY_HOSTUsed to determine a proxy host to use for Maven dependency resolution.SMITHY_VERSIONThe current version of the CLI.TERMUsed to detect if ANSI colors are supported.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Clears the system property for the variable.java.lang.Stringget()Gets the system property or the environment variable for the property, in that order.static java.lang.StringgetByName(java.lang.String name)Gets a system property or environment variable by name, in that order.booleanisSet()Returns true if the system property or environment variables is set.voidset(java.lang.String value)Sets a system property for the environment variable.static EnvironmentVariablevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static EnvironmentVariable[]values()Returns an array containing the constants of this enum type, in the order they are declared.
 
- 
- 
- 
Enum Constant Detail- 
SMITHY_MAVEN_CACHEpublic static final EnvironmentVariable SMITHY_MAVEN_CACHE A custom location for the Maven local repository cache.Example: ~/.m2/repository
 - 
SMITHY_MAVEN_REPOSpublic static final EnvironmentVariable SMITHY_MAVEN_REPOS A pipe-delimited list of Maven repositories to use.Example: https://example.com/repo1|https://example.com/repo2
 - 
SMITHY_DEPENDENCY_MODEpublic static final EnvironmentVariable SMITHY_DEPENDENCY_MODE Configures if and how the Smithy CLI handles dependencies declared in smithy-build.json files.- ignore: ignore dependencies and assume that they are provided by the caller of the CLI.
- forbid: forbids dependencies from being declared and will fail the CLI if dependencies are declared.
- standard: the assumed default, will automatically resolve dependencies using Apache Maven.
 If the CLI detects that Gradle is calling the CLI, dependency resolution is disabled and defaults to ignore. You can explicitly enable dependency resolution by settingSMITHY_DEPENDENCY_MODEtostandard.
 - 
SMITHY_VERSIONpublic static final EnvironmentVariable SMITHY_VERSION The current version of the CLI. This is set automatically by the CLI.
 - 
NO_COLORpublic static final EnvironmentVariable NO_COLOR If set to any value, disable ANSI colors in the output.
 - 
FORCE_COLORpublic static final EnvironmentVariable FORCE_COLOR If set to any value, force enables the support of ANSI colors in the output.
 - 
TERMpublic static final EnvironmentVariable TERM Used to detect if ANSI colors are supported.- If set to "dumb" colors are disabled.
- If not set and the operating system is detected as Windows, colors are disabled.
 
 - 
SMITHY_PROXY_HOSTpublic static final EnvironmentVariable SMITHY_PROXY_HOST Used to determine a proxy host to use for Maven dependency resolution.Set the host, protocol, and port information with a valid url. 
 NOTE: this setting will be used for all repositories defined in the smithy-build maven configuration unless a repo-specific configuration is provided.export SMITHY_PROXY_HOST=protocol://host:port
 - 
SMITHY_PROXY_CREDENTIALSpublic static final EnvironmentVariable SMITHY_PROXY_CREDENTIALS Used to determine a proxy credentials to use for Maven dependency resolution through a proxy.Use this setting in conjunction with the SMITHY_PROXY_HOSTvariable to configure proxy settings for dependency resolution.Set both the username and password information as a ":" separated string. 
 NOTE: this setting will be used for all repositories defined in the smithy-build maven configuration unless a repo-specific configuration is provided.export SMITHY_PROXY_CREDENTIALS=user:pass
 
- 
 - 
Method Detail- 
valuespublic static EnvironmentVariable[] values() Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (EnvironmentVariable c : EnvironmentVariable.values()) System.out.println(c); - Returns:
- an array containing the constants of this enum type, in the order they are declared
 
 - 
valueOfpublic static EnvironmentVariable valueOf(java.lang.String name) Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
- name- the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
- java.lang.IllegalArgumentException- if this enum type has no constant with the specified name
- java.lang.NullPointerException- if the argument is null
 
 - 
getByNamepublic static java.lang.String getByName(java.lang.String name) Gets a system property or environment variable by name, in that order.- Parameters:
- name- Variable to get.
- Returns:
- Returns the found system property or environment variable or null.
 
 - 
isSetpublic boolean isSet() Returns true if the system property or environment variables is set.- Returns:
- Returns true if set.
 
 - 
getpublic java.lang.String get() Gets the system property or the environment variable for the property, in that order.- Returns:
- Returns the found system property or environment variable or null.
 
 - 
setpublic void set(java.lang.String value) Sets a system property for the environment variable.- Parameters:
- value- Value to set.
 
 - 
clearpublic void clear() Clears the system property for the variable.
 
- 
 
-