Teamprise Knowledge Base

TKB00071 Installing Check-in Policies for the Command-line Client

Last updated 2008-03-06 14:33:05 UTC by Shaw Terwilliger

Overview

Teamprise 3.0 supports check-in policies, which are client-side code modules that are run during check-in, before the changes have been sent to the Team Foundation Server. Policies are defined at a Team Project scope, and Teamprise check-in policies must be defined using either the Teamprise Explorer or Teamprise Plug-in for Eclipse products. They cannot be configured using the CLC, but the CLC can evaluate existing policies at check-in if the JARs containing the policy implementations are available.

Teamprise 3.0 command-line client comes with a standard set of check-in policies, which are ready-to-use when the CLC package is extracted. No installation is necessary for the following standard policies (but they must be configured on a Team Project using a graphical Teamprise client):

  • Check for comments
  • Forbidden patterns
  • Work item
  • Work item query

Custom Policy Installation

To install a check-in policy implementation so it is available to the CLC, make sure its JAR is in the classpath of the CLC when it runs. There are two easy ways to do this:

  1. Copy the JAR to the lib directory where you extraced the CLC archive. All .jar files in this location are automatically added to the classpath when the tf wrapper script runs. All users who run the CLC from this install location will be able to use the check-in policy.
  2. Copy the JAR to the policies directory inside the base Teamprise settings directory (see Cache and Settings File Locations for the location of this directory depending on your platform). You might have to create the policies directory. Policies copied to this location will only be available to the user who owns the settings directory.

Troubleshooting

Not all custom check-in policies will support execution in the CLC. If you have defined a check-in policy on a team project that cannot be run in the CLC, check-ins made with the CLC will fail. You can override this failure using the -override option to the checkin command.

Products affected:

  • Teamprise Command Line Client

Releases affected:

  • 3.0

Platforms affected:

  • All

Related articles:

Keywords: checkin policy policies cip install CLC