Chapter 5. Properties

Property names should be short yet meaningful. The choice of a property name should be mnemonic -- that is, designed to indicate to the casual observer the intent of its use. One-character property names should be avoided. Property names will be all lowercase with underscore separating individual words.

Examples:


    <property name="build_dir" value="build"/>
    <property name="jar_dir" value="${build_dir}/jars"/>
    <property name="lib_home" value="lib"/>

Properties may be defined in a properties file. These property files should be named the same as the build file name, but with a ".properties" extension.

Properties may be "grouped" using the "dot" notation. For example, suppose the documentation for a project is divided into several manuals: the user manual, the installation manual, a technical support manual, and a examples manual, with the source for each manual residing in a separate directory. Then properties might look like this:


    <property name="docs_dir" value="docs"/>
    <property name="docs.user_manual" value="${docs_dir}/user_manual"/>  
    <property name="docs.install_manual" value="${docs_dir}/installation"/>  
    <property name="docs.tech_manual" value="${docs_dir}/techman"/>  
    <property name="docs.examples_manual" value="${docs_dir}/examples"/>