plugin-antpreprocess.dita 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. <prolog>
  9. <metadata>
  10. <keywords>
  11. <indexterm>plug-ins
  12. <indexterm>Ant</indexterm></indexterm>
  13. <indexterm>Ant
  14. <indexterm>preprocessing</indexterm></indexterm>
  15. </keywords>
  16. </metadata>
  17. </prolog>
  18. <taskbody>
  19. <context>
  20. <p>You can use the <codeph>depend.preprocess.pre</codeph> and <codeph>depend.preprocess.post</codeph> extension
  21. points to run a target before or after the entire pre-processing operation. In addition, there are extension
  22. points that enable you to run an Ant target before specific pre-processing steps.</p>
  23. <note conkeyref="conref-task/tip-extend-before-after-preprocessing"/>
  24. </context>
  25. <steps>
  26. <step>
  27. <cmd>Define and integrate the new Ant target.</cmd>
  28. </step>
  29. <step>
  30. <cmd>Create the following <filepath>plugin.xml</filepath> file:</cmd>
  31. <info><codeblock outputclass="language-xml normalize-space show-line-numbers show-whitespace">&lt;plugin id="<varname>plugin-id</varname>">
  32. &lt;feature extension="<varname>extension-point</varname>" value="<varname>Ant-target</varname>"/>
  33. &lt;/plugin></codeblock>where
  34. <ul>
  35. <li><varname>plugin-id</varname> is the plug-in identifier.</li>
  36. <li><varname>extension-point</varname> is a pre-processing extension point.</li>
  37. <li><varname>Ant-target</varname> is the name of the Ant target.</li>
  38. </ul></info>
  39. </step>
  40. <step>
  41. <cmd>Install the plug-in.</cmd>
  42. </step>
  43. </steps>
  44. <result>The new target is added to the Ant dependency list. The new target is now always run in conjunction with the
  45. specified step in the pre-processing pipeline.</result>
  46. <example>
  47. <title>Example</title>
  48. <p>The following <filepath>plugin.xml</filepath> file specifies that the
  49. <parmname>myAntTargetBeforeChunk</parmname> target is always run before the <codeph>chunk</codeph> step in the
  50. pre-processing stage.</p>
  51. <codeblock outputclass="language-xml normalize-space show-line-numbers show-whitespace">&lt;plugin id="com.example.extendchunk">
  52. &lt;feature extension="depend.preprocess.chunk.pre"
  53. value="myAntTargetBeforeChunk"/>
  54. &lt;/plugin></codeblock>
  55. <p>It assumes that the <parmname>myAntTargetBeforeChunk</parmname> target has already been defined and
  56. integrated.</p>
  57. <note conkeyref="conref-task/caution-extend-within-preprocessing"/>
  58. </example>
  59. </taskbody>
  60. </task>