-
Notifications
You must be signed in to change notification settings - Fork 41
1.2 Ant Coding Standards
This document covers Ant coding standards.
Build scripts (that use targets) should be minimally coded and instead leverage macrodefs. The idea is that the macrodef script files should be reusable outside Solenopsis in ways not considered yet!
Always define a description attribute for each target.
Global properties should be named after using the following notation:
[general purpose].[more specific purpose].[All cap'd, underbar seperated words]
For example:
- solenopsis.xsl.HOME
- sfdc.deploy.MAX_POLL
Always denote XML comments above the macrodef and include:
- details on the purpose.
- attribute explanations.
- an explanation if any global variables are set.
- short example(s).
Always denote URI attributes s in macrodefs consistently in the same script file. Example:
<macrodef name="xml-name" backtrace="true" uri="http://www.redhat.com/sfdc" description="Generate the name XML element">
Always denote a description attribute explaining what the macrodef performs.
Always include a a description of the attributes and their purpose.
Always use Ant <local> tasks within a macrodef.
Always unit test each macrodef using Ant Unit.