...
Multiple nested filters can be used. In this case, the order of defining them is the order they will be executed at installation time.
Filters are embedded in the nested filters element like this:
Code Block | ||||
---|---|---|---|---|
| ||||
<dynamicvariable ...>
... <!-- other nested arguments might go here -->
<filters>
<filter1 .../>
<filter2 .../>
... <!-- more filters might go here -->
</filters>
</dynamicvariable> |
Regular Expression Filter
...
Code Block | ||||
---|---|---|---|---|
| ||||
<dynamicvariables> <variable name="previous.version" jarfile="${INSTALL_PATH}/${INSTALL_SUBPATH}/libs/config.jar" entry="release.properties" type="options" key="release.version" checkonce="false" ignorefailure="true" condition="upgradecheck"> <filters> <regex regexp="([0-9]+(\.[0-9]+){2})" select="\1" defaultvalue="none"/> </filters> </variable> <variable name="RegExTest.Select.Windows" checkonce="true" regkey="HKLM\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment" regvalue="Path"> <filters> <regex regexp="([^;]*)(.*)" select="\1" defaultValue="(unmatched)" casesensitive="false"/> </filters> </variable> <variable name="RegExTest.ReplaceFirst.Windows" checkonce="true" regkey="HKLM\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment" regvalue="Path">"> <filters> <regex regexp="([^;]*)" replace="+++ \1 +++" defaultValue="(unmatched)" casesensitive="false" global="false"/> </filters> </variable> <variable name="RegExTest.ReplaceAll.Windows" checkonce="true" regkey="HKLM\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment" regvalue="Path"> <filters> <regex regexp="([^;]*)" replace="+++ \1 +++" defaultValue="(unmatched)" casesensitive="false" global="true"/> </filters> </variable> </dynamicvariables> |
...
Code Block | ||||
---|---|---|---|---|
| ||||
<variable name="previous.wrapper.java.command.canonical" value="${previous.wrapper.java.home.canonical}/bin/java" condition="haveInstallPath+isCompatibleUpgrade+haveWrapperJavaCmd+isSetCanonicalJavaHome"> <filters> <location basedir="${INSTALL_PATH}"/> </filters> </variable> |