plugin-antpreprocess.dita 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
  3. <!-- This file is part of the DITA Open Toolkit project. See the accompanying LICENSE file for applicable license. -->
  4. <task id="plugin-antpreprocess" xml:lang="en-US">
  5. <title>Adding an Ant target to the pre-processing pipeline</title>
  6. <shortdesc>You can add an Ant target to the pre-processing pipeline. This enables you to insert additional processing
  7. before or after the pre-processing chain or a specific step in the pre-processing operation.</shortdesc>
  8. <taskbody>
  9. <context>
  10. <p>You can use the <codeph>depend.preprocess.pre</codeph> and <codeph>depend.preprocess.post</codeph> extension
  11. points to run a target before or after the entire pre-processing operation. In addition, there are extension
  12. points that enable you to run an Ant target before specific pre-processing steps.</p>
  13. <note conref="../resources/conref-task.dita#ID/tip-extend-before-after-preprocessing"/>
  14. </context>
  15. <steps>
  16. <step>
  17. <cmd>Define and integrate the new Ant target.</cmd>
  18. </step>
  19. <step>
  20. <cmd>Create the following <filepath>plugin.xml</filepath> file:</cmd>
  21. <info><codeblock>&lt;plugin id="<varname>plugin-id</varname>">
  22. &lt;feature extension="<varname>extension-point</varname>" value="<varname>Ant-target</varname>"/>
  23. &lt;/plugin></codeblock>where
  24. <ul>
  25. <li><varname>plugin-id</varname> is the plug-in identifier.</li>
  26. <li><varname>extension-point</varname> is a pre-processing extension point.</li>
  27. <li><varname>Ant-target</varname> is the name of the Ant target.</li>
  28. </ul></info>
  29. </step>
  30. <step>
  31. <cmd>Install the plug-in.</cmd>
  32. </step>
  33. </steps>
  34. <result>The new target is added to the Ant dependency list. The new target is now always run in conjunction with the
  35. specified step in the pre-processing pipeline.</result>
  36. <example>
  37. <title>Example</title>
  38. <p>The following <filepath>plugin.xml</filepath> file specifies that the
  39. <parmname>myAntTargetBeforeChunk</parmname> target is always run before the <codeph>chunk</codeph> step in the
  40. pre-processing stage.</p>
  41. <codeblock>&lt;plugin id="com.example.extendchunk">
  42. &lt;feature extension="depend.preprocess.chunk.pre" value="myAntTargetBeforeChunk"/>
  43. &lt;/plugin></codeblock>
  44. <p>It assumes that the <parmname>myAntTargetBeforeChunk</parmname> target has already been defined and
  45. integrated.</p>
  46. <note conref="../resources/conref-task.dita#ID/caution-extend-within-preprocessing"/>
  47. </example>
  48. </taskbody>
  49. </task>