Add libraries to the classpath

If your transformation scenarios require additional Java libraries, you can add them to the classpath that is passed to the DITA-OT.

You can add libraries to the classpath at two levels:
  • Globally, in the outgen-init-client.xml file—You can set the following two references:
    • Specify in this reference a classpath that will be added before the standard ANT classpath. Since Jar files are read in the order that they appear in the classpath, that class definition that appears first is the one that will be used.
    • Specify in this reference a classpath that will be put at the end of the standard ANT classpath.
  • Locally, in a target—You can set the two references above directly in a target. However, in this case you cannot set the ID in the outgen-init-client.xml file. If you set IDs in this file, the Output Generator will use these values and ignore the IDs set in your target.
For more information about building classpaths, see the following documentation:

For example, if you want to add the classpath for the oXygen WebHelp plugin, you could configure it as follows:
<path id="">
   <!-- Load all the jar files present in the lib folder of the oXygen WebHelp plugin -->
   <fileset dir="${outgen.ot.dir}/plugins/com.oxygenxml.webhelp/lib/">
      <include name="*.jar"/>