Property Files define properties. Properties are stored in
key/value pairs and may only contain plain text. The suffix of these
files should be .properties
, the default Property File for a
Build File is build.properties
# Property files contain key/value pairs
key=value
# Property keys may contain alphanumeric chars and colons, but
# not special chars. This way you can create pseudo-namespaces
myapp.window.hsize=300
myapp.window.vsize=200
myapp.window.xpos=10
myapp.window.ypos=100
# You can refer to values of other properties by enclosing their
# keys in "${}".
text.width=${myapp.window.hsize}
# Everything behind the equal sign is the value, you do
# not have to enclose strings:
text=This is some text, Your OS is ${php.os}
Property files may also be formatted in YAML format:
# Property files contain key/value pairs key: value # Nested values will be available as concatenated strings after import. E.g., # you may access these values with keys in the form of "myapp.window.hsize". myapp: window: hsize: 300 vsize: 200 xpos: 10 ypos: 100 # You can refer to values of other properties by enclosing their # keys in "${}". text: width: "${myapp.window.hsize}"Property files may also be formatted in XML format:
<myapp> <window> <hsize>300</hsize> <vsize>200</hsize> <xpos>10</hsize> <ypos>100</hsize> </window> </myapp> myapp.window.hsize=300 myapp.window.vsize=200 myapp.window.xpos=10 myapp.window.ypos=100