< Previous | Next >

Setting up and installing ClearQuest CM API

Before you can use the ClearQuest® CM API, you must add files to your class path and have a licensed version of Rational® ClearQuest installed.
The API is a common component for performing operations on Rational products. To use this API with a Rational product, you must have that product installed on your system. You must also copy the API files that are installed on your system when you install the Rational product to your class path.
The following Java™ packages are required to perform Rational ClearQuest operations by using the API.
  • javax.wvcm: The workspace versioning and configuration management package (WVCM).
  • com.ibm.rational.wvcm.stp: The Rational software team package is an extension of the WVCM package. This package contains the interfaces of the API and provides the common object model for Rational product resources. This package is independent of product-specific repository or implementation boundaries.
  • com.ibm.rational.wvcm.stp.cq: A product-specific extension that provides access to ClearQuest databases. This package contains functions that provide fuller (product-specific) access to the functionality of a ClearQuest database and its underlying resources.

Although you should be able to cut and paste the code examples in this document into compilable Java, it has not been compiled and might contain typographical errors that prevent compilation. Complete, compilable versions of these examples can be found in the Eclipse project named samples found in the supplemental archive file distributed with the API documentation.

The ClearQuest CM API JAR file and other required JAR files are installed by default in the following locations, where install-dir represents the directory into which the Rational product files have been installed. By default, this directory is /opt/rational on the UNIX® system and Linux®, and C:\Program Files\IBM Rational on Windows® systems..
  • On Windows systems:
    • <install-dir>/Common/stpwvcm.jar: The ClearQuest CM API interface JAR file.
    • <install-dir>/Common/stpcmmn.jar: A common implementation JAR file.
    • <install-dir>/ClearQuest/stpcq.jar: Extension for the ClearQuest product.
    • <install-dir>/ClearQuest/cqjni.jar: A Rational ClearQuest JAR file.
  • On UNIX and Linux systems:
    • <install-dir>/common/stpwvcm.jar
    • <install-dir>/common/stpcmmn.jar
    • <install-dir>/clearquest/cqweb/lib/stpcq.jar
    • <install-dir>/clearquest/cqweb/lib/cqjni.jar

You must add the API JAR file locations to your class path before you can use the API.

Perform the following steps to access the ClearQuest CM API from an Eclipse plugin:

  1. Create an Eclipse plug-in by using the files located in the directory \plugins\com.ibm.rational.stp.cmapi in the archive file %RATIONAL_INSTALL%\common\cm\teamapi.zip.
  2. To add the ClearQuest CM API plug-in to your runtime configuration, copy the plug-in into your Eclipse instance or create a new extension installation site. This creates a new directory for the API (for example, C:\eclipse\plugins\com.ibm.rational.stp.cmapi). The new plug-in comprises the ClearQuest CM API JAR files and the Rational ClearQuest JAR files.
  3. After creating the plug-in directory, you must copy each installed JAR file from its installed location into this directory. The ClearQuest JAR files require the ClearQuest CM API JAR file. The plug-in is available to use the next time that you start Eclipse.
  4. To use the ClearQuest CM API from your plugin, identify com.ibm.rational.stp.cmapi as a dependency.
You are now ready to begin writing Java programs by using the ClearQuest CM API.
You must have a licensed and installed version of Rational ClearQuest before you can use the API with ClearQuest resources. If you install and configure the JAR files but do not have the corresponding product installed, calls to that Java package fail.

Lesson checkpoint

Now that you have set up your system for programming with ClearQuest CM API, you are ready to begin learning the API object model and programming model.
In this lesson, you learned the following:
  • The relationship between ClearQuest CM API and Rational ClearQuest
  • How to set up your system for programming with ClearQuest CM API
  • Which files in ClearQuest CM API are required for your system
< Previous | Next >

Feedback