Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

AttributeDescriptionValue RangeRequired
nameThe name of the property to set.a stringyes
valueThe static value of the property.a stringyes unless file or environment has been specified
fileAlternatively, the properties file to load all values froma valid pathyes, if value or environment has not been specified)
prefix

The prefix to be added to the properties names read from a file.

Only valid if the file attribute is specified.

A "." is appended to the prefix value if the prefix doesn't already end on with ".".

For example, if you set the attribute <property prefix="install"/> and the property file specified in <property file="company.properties"/> includes an property named COMPANY_NAME, then the property created will be named install.COMPANY_NAME rather than COMPANY_NAME.

a stringno
environment

Alternatively, loads Creates property values from all existing environment variables and uses the value of the environment attribute as a prefix.

A "." is appended to the end of the prefix specified by the environment attribute.

For example, if you set specify the attribute <property environment="env"/> and the according system has an environment variable out of the set of environment variables found at the system is named PATH, the resulting property name for this is a property named env.PATH , not just envPATHwill be created.

a stringyes if value or file has not been specified)

...

Code Block
languagehtml/xml
titleinstall.xml
<properties>
  <property name="info.appName" value="My Application"/>
  <property name="info.appsubpath" value="my-company/my-app"/>
  <property name="info.url" value="http://www.my-company.com"/>
  <property name="info.company.name" value="My Company Name"/>
  <property name="info.company.email" value="info@my-company.com"/>
</properties>

Example:

This sets creates properties based on the values of the properties specified.in the file "install.properties" file. The names of the properties is are the name names specified in the file with "install." added to the beginning of the name.

Code Block
languagehtml/xml
titleinstall.xml
<properties>
  <property file="install.properties"/>
  <property prefix="install"/>
</properties>

Example:

This creates properties based on the values of all of the system variables available to the installer. The names of the properties are the names of the system variables with "env." added to the beginning of the name.

Code Block
languagehtml/xml
titleinstall.xml
<properties>
    <property environment="env"/>
</properties>

Anchor
MavenProperties
MavenProperties
Maven Properties

...