Microsoft TFS Tasks: Installation


This document describes how to install the TFS Ant tasks. Specifically, this document details the steps neccessary to configure Ant and a build script so that the TFS Ant tasks are available to be invoked from the script.

Packaging

The TFS Ant tasks are packaged in a zip file for download. The zip file has a name in the form of:

	teamprise-ant-X.Y.zip

The zip file contains both the documentation for the TFS tasks and a JAR file containing the tasks themselves. The JAR file follows the same naming conventions as the zip file (but of course uses a different extension).

Loading the TFS tasks into Ant

There are a few ways to make the TFS tasks available to Ant. The recommended way is to import the TFS task antlib file by using the typedef Ant task:

	<typedef resource="com/teamprise/ant/antlib.xml" classpath="${basedir}/teamprise-ant-1.0.jar" />

The best place to put this call to typedef is towards the top of the build file that will use the TFS Ant tasks. Put the typedef line outside of any of the targets.

Note: This example assumes that the file teamprise-ant-1.0.jar exists and can be located relative to the value of the basedir property. It is possible to put the teamprise-ant-1.0.jar file in Ant's lib directory (eg ANT_HOME/lib). By doing this you can remove the classpath attribute from the above typedef call.