env
element. This element can have two attributes:key
: (mandatory) the name of the system environment variabledefault
: (optional) the default value of the variable if the environment variable does not exist<env key="APPLIS" />The value of the system environment variable will be used in most of the configuration files with the
${variable_name}
pattern.<files> <env key="APPLIS" /> ... <file url="config/${APPLIS}" /> </files>
setenv
element. This element can have these attributes:key
: (mandatory) the name of the system environment variablevalue
: (mandatory) the value of the variabletype
: (optional) "default" by default, or "url" if the environment variable represents an URL. In this case the environment variable will always be set as the absolute path relative to the filelistoverwrite
: (optional) true if it is allowed to overwrite the current value of the environment variable if it already exists<files> <setenv key="APPLIS" value="applications.xml" /> </files>
<files> <env key="PROPERTIES" /> <confProperty key="applis" value="applications.xml" /> <file url="config/${applis}" /> <file url="${services}" /> <file url="types.xml" /> <file url="${PROPERTIES}" /> </files>which can be called by:
set PROPERTIES=properties.xml java -jar protoFramework.jar -config=filelist.xml
<files> <setenv key="MYJSONFILE" type="url" value="myFile.json" /> <file url="applis.xml" /> <file url="services.xml" /> <file url="types.xml" /> </files>which can be called by:
java -jar protoFramework.jar -config=filelist.xml
In that case for example if one of the modules is a Python module and it uses the MYJSONFILE
environment variable, we will be sure that the absolute path of the file will be set rather than the path relative to the filelist.Copyright 2017-2020 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence