Table of Contents
More Resources
Use Your Own Ant Build File

easyDITA supports custom Ant build files, but there are some key points you must adhere to for it to work. 
section

Mandatory Parameter Values

easyDITA communicates with the DITA Open Toolkit using the command line and always passes two parameters to the specified Ant build file. These parameters are “args.input” and “output.dir”. Because easyDITA runs the entire process dynamically, there is no way to predict where the input files will be prior to processing, which is why easyDITA supplies the args.input at run time. 
When creating a custom Ant build file make sure the < property /> tags for args.input and output.dir appear as follows:
  • < property name=”args.input” value=”${args.input}”/>
  • < property name=”output.dir” value=”${output.dir}”/>
This will pass the proper values from the command line, where easyDITA supplies them, into the DITA Open Toolkit.
Here is a simple example configuration: 
< project name="example" default="dita2example"> 
...
  < !-- Allow the build process access to environment variables --> 
  < property environment="env"/> 
  < !-- Set toolkit directory from environment variable --> 
  < property name="toolkit_dir" value="${env.DITA_DIR}"/> 
...
  < target name="dita2example"> 
    < ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init"> 

      < property name="args.input" value="${args.input}"/> 
      < property name="output.dir" value="${output.dir}"/> 

    < /ant> 		  
  < /target> 
< /project> 

section

Other key points 

  • Don’t worry about running the integrator, easyDITA automatically runs it prior to every publish.
  • Always use the ${env.DITA_HOME} as the reference to your DITA Open Toolkit.
  • Don’t set the args.logdir; easyDITA takes care of this dynamically. Setting this variable can (and often will) lead to publishing failures which are hard to detect.