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:
outgen.job.ant.classpath.client.before.id
: 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.outgen.job.ant.classpath.client.after.id
: 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.
https://ant.apache.org/manual/using.html#path
For example, if you want to add the classpath for the oXygen WebHelp
plugin, you could configure it as
follows:
<path id="outgen.job.ant.classpath.client.before.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"/>
</fileset>
</path>