path.<expression>
. The path can be reused in the properties file by using the following expression: ${path.<expression>}
path.myPath=tutu/toto graphics=DefGraphics.xml pictures=DefPictures.xml ui=LookAndFeel.xml lf=windows serverInputPort=8080 serverOutputPort=8081 serverInputSize=500 serverOutputSize=100 maximumQueueSize=30 server.autoVisible=false extensions=${path.myPath}/MyExtension.jarHere the
extensions
property will have the value tutu/toto/MyExtension.jar
env.<expression>
. The value of the environment variable can be reused in the properties file by using the following expression: ${env.<expression>}
env.myenv=MY_ENV_VAR graphics=DefGraphics.xml pictures=DefPictures.xml ui=LookAndFeel.xml lf=windows serverInputPort=8080 serverOutputPort=8081 serverInputSize=500 serverOutputSize=100 maximumQueueSize=30 server.autoVisible=false extensions=${env.myenv}/MyExtension.jarHere the MY_ENV_VAR environment variable has the value "tutu/toto", the
extensions
property will have the value tutu/toto/MyExtension.jar
extensions=extension1.jar;extension2.jar
graphics=DefGraphics.xml pictures=DefPictures.xml ui=LookAndFeel.xml lf=windows serverInputPort=8080 serverOutputPort=8081 serverInputSize=500 serverOutputSize=100 maximumQueueSize=30 logServerArea=false server.autoVisible=false server.computeLayerSize=true server.background=255,255,255
<define key="def2" /> <import path="propertiesChild1.xml" /> <import ifdef="def1" path="child/propertiesChild2.xml" /> <import ifdef="def2" path="child/propertiesChild3.xml" /> <property key="lf" value="metal" /> <property ifdef="def1" key="supplement" value="3" /> <property ifdef="def2" key="supplement" value="5" />
<properties> <path key="parent" value=".." /> <property key="graphics" value="${parent}/DefGraphics.xml" /> ... </properties>The "graphics" property will have the value:
../DefGraphics.xml
<properties> <env key="graphics" value="ENV_GRAPHICS"/> <property key="graphics" value="${env.graphics}" /> ... </properties>If the system environment variable ENV_GRAPHICS has the value "myPath", The "graphics" property will have the value:
myPath/DefGraphics.xml
<properties> <setenv key="ENV_GRAPHICS" value="myPath2"/> <env key="graphics" value="ENV_GRAPHICS"/> <property key="graphics" value="${env.graphics}" /> ... </properties>The "graphics" property will have the value:
myPath2/DefGraphics.xml
, regardless of the value of the ENV_GRAPHICS system environment variable, and even if this environment variable is undefined.
C://directory/myFile.xml
) or relative to the properties file (for example myFile.xml
)250;250;250
<properties> <property key="graphics" value="defGraphics.xml" /> ... </properties>
<properties> <property key="extensions" value="extension1.jar;extension2.jar" /> ... </properties>is equivalent to:
<properties> <arrayProperty key="extensions"> <element key="extension1.jar" > <element key="extension2.jar" > </arrayProperty> ... </properties>
<properties> <import path="propertiesChild1.xml" /> <property key="lf" value="metal" /> </properties>
${property key}
.
<path key="parent" value=".." /> <property key="graphics" value="${path.parent}/DefGraphics.xml" /> <echo message="graphics is ${graphics} and path is ${parent}" />
Copyright 2016-2017 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v2 licence