Edit online

Automating DITA to WebHelp Responsive Output with Jenkins

This procedure assumes that you have already integrated, configured, and registered the Oxygen XML WebHelp Responsive plugin with the DITA Open Toolkit.

To integrate WebHelp output with the Jenkins continuous integration tool, follow these steps:
  1. Create a Maven project to incorporate the DITA-OT that already integrates Oxygen XML WebHelp Responsive plugin.
  2. Go to the root of your Maven project and edit the pom.xml file to include the following fragment:
    <properties>
        <dita-ot-dir>${basedir}/tools/dita-ot</dita-ot-dir>
        <!-- 
            The path to the DITA map that you want to process. 
        -->
        <input-file>path/to/input_file</input-file>
            
        <!-- 
            Specifies the path of the output directory.
        -->
        <output-dir>path/to/output_dir</output-dir>
        
        <!-- 
            The path to the WebHelp publishing template. 
        -->
        <publishing-template>path/to/publishing_template</publishing-template>   
    		
        <!--
            DITA-OT optional build parameters.
        -->
        <options>-Dwebhelp.publishing.template=${publishing-template} -v</options>
    </properties>
        
    <plugin>
        <artifactId>exec-maven-plugin</artifactId>
        <groupId>org.codehaus.mojo</groupId>
        <executions>
            <execution>
                <!-- Run WebHelp Responsive transformation -->
                <id>run-webhelp-responsive</id>
                <phase>generate-sources</phase>
                <goals>
                    <goal>exec</goal>
                </goals>
                <configuration>
                    <executable>${dita-ot-dir}/bin/dita.bat --format=webhelp-responsive
                         --input=${input-file} --output=${output-dir} ${options}</executable>
                </configuration>
            </execution>
       </executions>
    </plugin>
  3. Go to the Jenkins top page and create a new Jenkins job. Configure this job to suit your particular requirements, such as the build frequency and location of the Maven project.