Formatting

Four spaces should be used as the unit of indentation.

Do not use tabs instead, use 4 spaces in place of a single tab. Many editors can do this automatically.

Vertically align start and end tags for an element. Indent child elements.

Avoid lines longer than 80 characters, since they're not handled well by many terminals and tools.

Use a single space after a comma.

Group properties by use, for example, group directory definitions together. Insert a single blank line between groups.

Insert two blank lines between targets.

Insert one blank line between tasks within a target.

When an expression will not fit on a single line, break it according to these general principles:

Examples:


    <property name="modules"
        value="libs, junit_tests, images, docs, api_docs, external_libs,
              sources" />
        
    <copy todir="${unit_test_deploy}" overwrite="true">
        <fileset dir="${unit_test_home}">
            <exclude name="**/CVS" />
        </fileset>
    </copy>

This is wrong:


  <target name="test_all" depends="clean,setupApp,
                                    setupTests,setupLogger,
                    startReportServlet,runTests"/>

This is right:


    <target name="test_all" 
        depends="clean, setupApp, setupTests, setupLogger, 
                startReportServlet, runTests"/>