Command line tool

Model RealTime provides two command-line tools for launching compare and merge sessions from the command-line or scripts:

  1. XtoolsTypeManager: This is an executable on Windows, and a shell-script on Linux. It’s located in the plugin folder for the com.ibm.xtools.comparemerge.team plugin. For example:

    <install-dir>\plugins\com.ibm.xtools.comparemerge.team_7.60.100.v20150603_0908\utm
    

    One way to find out the exact path to XtoolsTypeManager, which for example a script can use, is to look in the file TypeManagerLaunchCommand.cfg which is located in the user's home directory under AppData/Roaming/Rational/TeamServerSharedData (on Windows) and rational/TeamServerSharedData/linux_x86 (on Linux). The path to XtoolsTypeManager is specified in this file.

  2. cmcmdline.jar: This is a Java application. It’s located in the same place as the XtoolsTypeManager.

Hint: The full path to cmcmdline.jar can be seen in the preferences at General – Compare/Patch – Modeling Compare/Merge – Compare/Merge Server.

The XtoolsTypeManager is specifically designed for integration with ClearCase. It is possible to also use it as a general command-line tool for Compare/Merge, but for that we instead recommend the cmcmdline.jar Java application which is more generic, newer and more feature-rich.

In This Topic:

Commands

Launch the command-line tool using Java like this:

java -cp cmcmdline.jar com.ibm.xtools.comparemerge.cmcmdline.CMTool <command> <options>

You should use the same Java virtual machine that you use for running Model RealTime (normally specified in eclipse.ini using the -vm argument).

<command> is one of the following:

Options

You must also specify <options> according to which command that is used. The following options are available (use the -help option to list all available options):

-autoLaunch "C:\rtist\eclipse\eclipse.exe -nosplash -data C:\rtist\egit_workspace -showlocation" 

Command-Line Integrations with CM Tools

Many CM systems can be used from the command-line. It's then convenient to have an integration with Model RealTime Compare/Merge so that compare and merge operations performed with the CM tool will launch the Model RealTime Compare/Merge tool for model files. Such integrations use the Model RealTime Compare/Merge command-line tool.

ClearCase comes with a pre-configured integration which uses the XtoolsTypeManager. That's why a command like cleartool diff on model files will launch an Model RealTime compare session and not the standard diff tool.

For other CM systems, such as Git, you need to configure the integration yourself. In general what is usually needed is to write a wrapper script which takes arguments from the CM system and uses some of them in order to invoke the cmcmdline.jar Java application with appropriate arguments. Note that the XtoolsTypeManager should not be used in this case, since it is specifically designed for the ClearCase integration. Refer to the CM system's documentation for the exact steps to set-up such an integration.