Learning how buildfiles tell Ant what and how to compile.
The sample Ant build scripts provided by the DITA-OT may not be adequate to meet the needs of your documentation project. This topic describes how to customize the default scripts and write your own.
The DITA Open Toolkit contains sample build files for both the DITA-OT and sample documentation. Writers new to the toolkit use the sample_all.xml Ant build script to create all the sample documents that come with DITA-OT. The toolkit also contains build scripts for individual ouput types, such as sample_pdf.xml. You can modify just one or two Ant properties in these scripts for your own documentation.
Here is the Ant project definition from template_pdf.xml
The default build script may not meet the needs of your project for a range of reasons:
You need to cutomize or write your own build file for these use cases. For example, each target for this guide's build script uses a separate value for dita.temp.dir to assist debugging for a specific output types.
Here is the beginning of the ant script that produced this document:
Ant Properties for DITA-OT contains a short list of the most basic Ant properties used by DITA-OT. Use these properties to customize your document's build script for your needs.