Skip to main content
Skip table of contents

Using the Command Line Tool

Invoking DITA Merge

DITA Merge can be run using a command-line interface that is invoked from a terminal window or Windows command line.

Replace x.y.z with the major.minor.patch version number of your release e.g. deltaxml-dita-merge-5.0.0.jar

There are two types of command-line interfaces:

  1. Java API-based command-line interface

    CODE
    java -jar deltaxml-dita-merge-x.y.z.jar command mergeType arguments
  2. REST API-based command-line interface

    CODE
    java -jar deltaxml-dita-merge-rest-client-x.y.z.jar command mergeType arguments

    The source code for this interface is available in Bitbucket. This was designed to give you some understanding of the DITA Merge REST API.

The two jars deltaxml-dita-merge-x.y.z.jar and deltaxml-dita-merge-rest-client-x.y.z.jar are included in the distribution.

These interfaces are implemented to quickly run a merge from the command line. However, they do not provide all the features of the Java or REST API such as rule configuration.

Supported  Merge Types

Merge Type

Description

concurrent

N-Way concurrent merge

concurrent3

Three way concurrent merge

sequential

N-Way sequential merge

Supported Commands

describe

This command is used to see the description of the available parameters for the specified merge type.

CODE
java -jar <jar-name> describe merge-type

For Example,

CODE
java -jar <jar-name> describe concurrent

merge

Runs a merge for the specified merge type. Each file needs to have a name which is used to identify the version in the generated DeltaV2 result.

CODE
java -jar <jar-name> merge mergeType
                           ancestorName/version1Name ancestorFile/version1File
                           (versionName versionFile)+ 
                           resultFile 
                           params

The example below will merge three revisions ('anna', 'ben' and 'chris') against the 'ancestor' version with merge type as concurrent. The inputs used in the example below are included in your release in the samples/data directory. Note: the command has been wrapped to aid readability.

CODE
java -jar <jar-name> merge concurrent
                           ancestor samples/html-data/four-edits.html
                           anna samples/html-data/four-edits-anna.html
                           ben samples/html-data/four-edits-ben.html
                           chris samples/html-data/four-edits-chris.html
                           result.xml

license

Prints out the current activated license details. NOTE: The REST API-based command-line interface does not support this command.

Merge command parameters

Optional command-line parameters can be added to the end of the command-line, these are used to set options for the merge process.

The command-line syntax for parameters is: name=value.

The supported parameters are listed on the page Configuration Options.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.