Building an Eclipse Help plugin is more than creating a toc.xml and a plugin.xml. You have to collect all needed files in the needed file structure and create a JAR with OSGi bundle information. Also references between the files should not be go outside the structure in a relative way (you could use links like http://ant.apache.org but no ../images). The makro buildPlugin does this work.
Mainly the cover.html from the Ant Manual loads an image from the site directory (../images). The link will be modified an the graphic will be copied.
| Attribute | Description | Required |
| manualDir | The directory where Ant's manual is. | Yes |
| antVersion | The version of Ant's Manual. | Yes |
| buildDir | Where to build the artefacts. | Yes |
| pluginDir | Whether to generate the plugin files. | No, default "@{buildDir}/manual4eclipse" |
| pluginPackage | In which package should the plugin reside. | No, default "org.apache.ant.manual" |
<target name="gen" xmlns:m4e="antlib:org.apache.ant.manual4eclipse">
<property name="build" value="build"/>
<property name="ant.trunk" location="path/to/my/svn/checkout/of/Ant/Core"/>
<mkdir dir="${build}"/>
<m4e:buildPlugin manualDir="${ant.trunk}/docs/manual"
antVersion="1.7.1alpha"
buildDir="${build}"
/>
</target>
This target generates an Eclipse Help plugin org.apache.ant.manual_1.7.1alpha.v20070301.jar
(with 20070301 as timestamp) into build with the plugin files and the html manual from
path/to/my/svn/checkout/of/Ant/Core/docs/manual.