Environment Variables
SAP Help uses a number of environment variables to refer to the paths of SAP Commerce Cloud components. These variables provide a common reference by making the paths independent of the installation environment.
The following table summarizes the common SAP Commerce Cloud environment variables as they are used in SAP Help. The variables that have a default value are defined in the env.properties file of your SAP Commerce Cloud installation.
|
Variable Name |
Description |
Default |
|---|---|---|
| BASE_DIR |
The directory where you install your software. This is the parent directory where you unzip SAP Commerce Cloud. Examples are /opt or /usr/bin. |
None |
| HYBRIS_HOME_DIR |
Points to the current SAP Commerce Cloud instance. This is the directory that is created when you extract the SAP Commerce Cloud zip file. For example, <BASE_DIR>/HYBRISCMR6X00P_X-XXXXXXXX. |
None |
| HYBRIS_BIN_DIR |
Points to the /bin directory of your SAP Commerce Cloud instance, which contains the platform and all extensions. |
<HYBRIS_HOME_DIR>/hybris/bin |
| HYBRIS_CONFIG_DIR |
Points to the /config directory of your SAP Commerce Cloud instance, which contains configuration files. |
<HYBRIS_HOME_DIR>/hybris/config |
| HYBRIS_DATA_DIR |
Points to the /data directory of your SAP Commerce Cloud instance, which contains runtime data. |
<HYBRIS_HOME_DIR>/hybris/data |
| HYBRIS_LOG_DIR |
Points to the /log directory of your SAP Commerce Cloud instance, containing log files from the SAP Commerce Cloud Server, JDBC logging, etc. |
<HYBRIS_HOME_DIR>/hybris/log |
| HYBRIS_TEMP_DIR |
Points to the /temp directory of your SAP Commerce Cloud instance, which contains any temporary files. |
<HYBRIS_HOME_DIR>/hybris/temp/hybris |
| TOMCAT_HOME_DIR |
Points to the directory where your Apache Tomcat installation runs. This differs depending on whether you use the embedded Tomcat, or a standalone Tomcat installation. If you use the embedded Tomcat instance, it is <HYBRIS_BIN_DIR>/platform/tomcat. |
None |
Modifying a Variable
You can change any of the default variables to point to a different path. The most common use case for changing an environment variable is the creation of a different set of configuration files for testing or development purposes. In this case, you can override the <HYBRIS_CONFIG_DIR> variable to point to another directory. Make this change in one of the following ways:
- Set the new environment variable in an ant call, for example: ant all -DHYBRIS_CONFIG_DIR=/opt/hybris/config_test
- Set the new environment variable for a particular console session:
- In Microsoft Windows systems, use the set command. For example:
C:\hybris\bin\platform>set HYBRIS_CONFIG_DIR=C:\hybris\config_test
- In Unix systems, use the env, set, or export command. For example:
phoenix@phoenix ~ $ export HYBRIS_CONFIG_DIR=/config_test
- In Microsoft Windows systems, use the set command. For example:
The following examples show the output of a build using a modified variable for the current session.
If the specified target folder does not exist, SAP Commerce Cloud asks you to choose the configuration template, then creates it during the build process.
SAP Commerce Cloud logs environment variables during the build process.