Dynamic variables behave like "normal" static variables defined by the <variable> tag, except that they are evaluated on each panel change. In comparison to normal variables dynamic variables have been enhanced by many more facilities. You can set dynamic variables values from the following sources on the target computer:
- plain values
- environment variables
- INI files
- option/property files (key-value pairs)
- XML files (using XPath-like queries)
- INI/option/XML files from within an ZIP or JAR file
- Windows registry
- output of a command execution
and filter them optionally using regular expressions. A particular dynamic variable can be evaluated based on a certain condition.
Example:
<variables> <variable name="INSTALL_SUBPATH" value="server"/> </variables> <dynamicvariables> <variable name="previous.version" jarfile="${INSTALL_PATH}/${INSTALL_SUBPATH}/libs/version.jar" entry="release.properties" type="options" key="release.version" checkonce="false" ignorefailure="true"> <regex regexp="(\[0-9\]+(\.\[0-9\]+){2})" select="\1" defaultvalue="XX.XX.XX"/> </variable> </dynamicvariables>