Feature and Plug-in custom build steps

New in 3.2 is the ability for a feature or plug-in to contribute custom ant targets to its own build.  These custom steps can be used for things like instrumenting byte-code after compilation, indexing help files for documentation, or copying extra files into the bundle. 

To use custom targets, a feature or plug-in must define the property customBuildCallbacks in its build.properties file; the value of this property is the location of an xml file, relative to the root of the feature/plug-in, containing the custom targets. If the xml file is located elsewhere, use the property customBuildCallbacks.buildpath to set the directory to use.

Templates named customBuildCallbacks.xml containing the supported custom targets are provided in org.eclipse.pde.build/templates/plugins and  org.eclipse.pde.build/templates/features.  These templates can be copied into your feature/plug-in and modified as needed.

The custom targets will be invoked using the subant task; by default, failonerror is set to false. To change this set the property customBuildCallbacks.failonerror to true. Similarly, the inheritall parameter defaults to false. Set the property customBuildCallbacks.inheritall to change this.

Plug-ins

The generated build.xml that builds a plug-in contains several targets that perform specific tasks.  PDE Build allows the plug-in to provide custom pre and post targets that will be called before and after specific tasks.  In addition to any ant properties that may already be defined, each custom target may also be passed a couple of specific properties.  The following targets support custom callbacks:

Features

The generated build.xml for features only supports custom build callbacks for the gather.bin.parts target.  This target will invoke the gather.bin.parts target of all the included features and plug-ins.  It supports pre.gather.bin.parts and post.gather.bin.parts.  Both of these targets are provided with the following properties: