Invoking DITA Merge
DITA Merge can be run using a command-line interface that is invoked from a terminal window or Windows command line.
x.y.z with the
major.minor.patch version number of your release e.g.
There are two types of command-line interfaces:
Java API-based command-line interface
java -jar deltaxml-dita-merge-x.y.z.jar command mergeType argumentsCODE
REST API-based command-line interface
java -jar deltaxml-dita-merge-rest-client-x.y.z.jar command mergeType argumentsCODE
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-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
|concurrent||N-Way concurrent merge|
|concurrent3||Three way concurrent merge|
|sequential||N-Way sequential merge|
This command is used to see the description of the available parameters for the specified merge type.
java -jar <jar-name> describe merge-type
java -jar <jar-name> describe concurrent
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.
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.
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
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:
The supported parameters are listed on the page Configuration Options.