Feature and Plug-in custom build steps

New in 3.2 is the ability for a feature or plug-in to contribute custom custom steps 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.  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 respectively.  These templates can be copied into your feature/plug-in and modified as needed.  The custom targets will be invoked using the subant task with failonerror="false", so that the build will containue if your custom xml file does not contain a particular target or an error occurs .

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 that 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: