Adding a Java library to the DITA-OT classpath parameter
You can use the
dita.conductor.lib.import extension point to add an additional Java
library to the DITA-OT classpath parameter.
- If necessary, compile the Java code into a JAR file.
Create a plugin.xml file that contains the following code:
<plugin id="plugin-id"> <feature extension="dita.conductor.lib.import" file="file"/> </plugin>
- plugin-id is the plug-in identifier, for example, com.example.addjar.
- file is the name of the JAR file, for example, myJavaLibrary.jar.
- Install the plug-in.
In the following extended example, the myJavaLibrary.jar file performs a validation step
during processing, and you want it to run immediately before the
To accomplish this, you will need to use several features:
- The JAR file must be added to the classpath.
- The Ant target must be added to the dependency chain for conref.
- An Ant target must be created that uses this class, and integrated into the code.
The files might look like the following: