building-with-ant.html 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <!DOCTYPE html
  2. SYSTEM "about:legacy-compat">
  3. <html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="UTF-8"><meta name="copyright" content="(C) Copyright 2016"><meta name="DC.rights.owner" content="(C) Copyright 2016"><meta name="DC.Type" content="task"><meta name="description" content="You can build output by using an Ant build script to provide the DITA-OT parameters."><meta name="DC.Relation" scheme="URI" content="../user-guide/publishing-with-ant.html"><meta name="DC.Relation" scheme="URI" content="../user-guide/build-migrating-ant-to-dita.html"><meta name="DC.Relation" scheme="URI" content="../user-guide/creating-an-ant-build-script.html"><meta name="DC.Relation" scheme="URI" content="../user-guide/ant.html"><meta name="DC.Relation" scheme="URI" content="../parameters/parameters_intro.html"><meta name="DC.Relation" scheme="URI" content="http://ant.apache.org/manual"><meta name="DC.Format" content="XHTML"><meta name="DC.Identifier" content="runant"><meta name="DC.Language" content="en"><link rel="stylesheet" type="text/css" href="../css/commonltr.css"><link rel="stylesheet" type="text/css" href="../css/dita-ot-doc.css"><title>Building output using Ant</title></head><body id="runant"><header role="banner"><div class="header">
  4. <p>DITA Open Toolkit</p>
  5. <hr>
  6. </div></header><nav role="toc"><ul><li><a href="../index.html">DITA Open Toolkit 2.3</a></li><li><a href="../release-notes/index.html">Release Notes</a></li><li><a href="../getting-started/index.html">Getting Started</a></li><li><a href="../user-guide/index.html">User Guide</a><ul><li><a href="../user-guide/transforming-dita-content.html">Publishing DITA content</a><ul><li><a href="../user-guide/build-using-dita-command.html">Using the dita command</a></li><li><a href="../user-guide/publishing-with-ant.html">Using Ant</a><ul><li><a href="../user-guide/ant.html">Ant overview</a></li><li class="active"><a href="../user-guide/building-with-ant.html">Building output using Ant</a></li><li><a href="../user-guide/creating-an-ant-build-script.html">Creating an Ant build script</a></li></ul></li></ul></li><li><a href="../user-guide/AvailableTransforms.html">Output formats</a></li><li><a href="../user-guide/DITA_spec-support.html">DITA specification support</a></li><li><a href="../user-guide/DITA-globalization.html">Globalizing DITA content</a></li><li><a href="../user-guide/troubleshooting-overview.html">Troubleshooting</a></li></ul></li><li><a href="../parameters/index.html">Parameter Reference</a></li><li><a href="../dev_ref/index.html">Developer Reference</a></li><li><a href="../user-guide/dita-and-dita-ot-resources.html">DITA Resources</a></li></ul></nav><main role="main"><article role="article" aria-labelledby="ariaid-title1">
  7. <h1 class="title topictitle1" id="ariaid-title1">Building output using Ant</h1>
  8. <div class="body taskbody"><p class="shortdesc">You can build output by using an Ant build script to provide the DITA-OT parameters.</p>
  9. <div class="tasklabel"><h2 class="sectiontitle tasklabel">Procedure</h2></div><ol class="ol steps"><li class="li step stepexpand">
  10. <span class="ph cmd">Open a command prompt or terminal session, and then change to the directory where the
  11. DITA Open Toolkit is installed.</span>
  12. </li><li class="li step stepexpand">
  13. <span class="ph cmd">Issue the following command:</span>
  14. <table class="simpletable choicetable choicetableborder frame-topbot"><col style="width:25%"><col style="width:75%"><thead><tr class="sthead chhead"><th class="stentry choptionhd" id="d48544e30-option">Option</th><th class="stentry chdeschd" id="d48544e30-desc">Description</th></tr></thead><tbody><tr class="strow chrow">
  15. <th scope="row" class="stentry choption" headers="d48544e30-option">Linux or Mac OS&nbsp;X&nbsp;</th>
  16. <td class="stentry chdesc" headers="d48544e30-desc">
  17. <span class="keyword cmdname">bin/ant</span>
  18. <span class="keyword option">-f</span>
  19. <code class="ph codeph"><var class="keyword varname">build-script</var>
  20. <var class="keyword varname">target</var></code>
  21. </td>
  22. </tr><tr class="strow chrow">
  23. <th scope="row" class="stentry choption" headers="d48544e30-option">Windows</th>
  24. <td class="stentry chdesc" headers="d48544e30-desc">
  25. <span class="keyword cmdname">bin\ant</span>
  26. <span class="keyword option">-f</span>
  27. <code class="ph codeph"><var class="keyword varname">build-script</var>
  28. <var class="keyword varname">target</var></code>
  29. </td>
  30. </tr></tbody></table>
  31. <div class="itemgroup info"> where:
  32. <ul class="ul">
  33. <li class="li"><var class="keyword varname">build-script</var> is name of the Ant build script.</li>
  34. <li class="li"><var class="keyword varname">target</var> is an optional switch that specifies the name of the Ant target that you want
  35. to run. <p class="p">If you do not specify a target, the value of the <code class="keyword markupname xmlatt">@default</code> attribute for the Ant
  36. project is used.</p>
  37. </li>
  38. </ul></div>
  39. </li></ol>
  40. </div>
  41. <nav role="navigation" class="related-links"><div class="familylinks"><div class="parentlink"><strong>Parent topic:</strong> <a class="link" href="../user-guide/publishing-with-ant.html" title="You can use Ant to invoke the DITA Open Toolkit and generate output. You can use the complete set of parameters that are supported by the toolkit.">Publishing DITA content from Ant</a></div></div><div class="linklist linklist relinfo relconcepts"><strong>Related concepts</strong><br><div><a class="link" href="../user-guide/ant.html" title="Ant is a Java-based, open-source tool that is provided by the Apache Foundation. It can be used to declare a sequence of build actions. It is well suited for both development and document builds. The toolkit ships with a copy of Ant.">Ant</a></div></div><div class="linklist linklist relinfo reltasks"><strong>Related tasks</strong><br><div><a class="link" href="../user-guide/creating-an-ant-build-script.html" title="Instead of typing the DITA-OT parameters at the command prompt, you might want to create an Ant build script that contains all of the parameters.">Creating an Ant build script</a></div><div><a class="link" href="../user-guide/build-migrating-ant-to-dita.html" title="Although Ant builds are still supported in the DITA Open Toolkit, you might want to switch to use the new dita command.">Migrating Ant builds to use the dita command</a></div></div><div class="linklist linklist relinfo relref"><strong>Related reference</strong><br><div><a class="link" href="../parameters/parameters_intro.html" title="Certain parameters apply to all DITA-OT transformations. Other parameters are common to the HTML-based transformations. Some parameters apply only to specific transformation types. These parameters can be passed as options to the dita command using the -Dparameter-name=value syntax or included in build scripts as Ant properties.">DITA-OT parameters</a></div><div><a class="link" href="http://ant.apache.org/manual" target="_blank">Apache Ant documentation</a></div></div></nav></article></main></body></html>