Skip to content

1.1 Ant Coding Standards

sfloess edited this page Mar 13, 2013 · 2 revisions

This document covers Ant coding standards.

URIs

Always denote URIs in macrodefs consistently in the same script file. Example:

<project name="SFDC Utilities" xmlns:rh-sfdc="http://www.redhat.com/sfdc">
    <macrodef name="xml-name" backtrace="true" uri="http://www.redhat.com/sfdc" description="Generate the name XML element">
...

Macrodefs

Description attribute

Include a description attribute on all macrodefs. Example:

<macrodef name="xml-name" backtrace="true" uri="http://www.redhat.com/sfdc" description="Generate the name XML element">

URI

Include a uri attribute on all macrodefs. Example:

<macrodef name="xml-name" backtrace="true" uri="http://www.redhat.com/sfdc" description="Generate the name XML element">

property names

Should

All macrodef defined properties should reflect the name of the build script, dot, macro def name, dot, any number of additional lower case identifiers separated by a dot, and upper case property name:

  • sfdc-util.push.PACKAGE

Typical

The aforementioned did not seem to be used consistently. More often you will see macro def name, dot, any number of additional lower case identifiers separated by a dotand upper case property name:

  • push.tmp.DIR
Clone this wiki locally