Requirements

Prepare the Team Build Server

  1. Install the Java JDK on the build agent
  2. Install Ant on the build agent
  3. Download the source and compile or download the binaries for TFS 2010 Ant Build
  4. Add the assemblies to TFS Source Control
    1. This should be a central location where all custom build assemblies would be kept
  5. Add the XAML Build Templates (AntBuildTemplate.xaml) to TFS version control
    1. This can be kept anywhere, but someplace central is best
  6. Check in the custom assemblies and build template
  7. Update the build controller to reference this custom assemblies location
    1. Open Team Explorer
    2. Expand a Team Project, right click on Builds and select Manage Build Controllers
    3. Select the appropriate build controller and click Properties
    4. Select the above path in version control to locate the custom build assemblies
  8. Save and close all dialogs

Create a new Build Definition

  1. Open a Team Project in Team Explorer
  2. Right-click on the Builds node, select New Build Definition
  3. Enter in the desired details in the General and Trigger tabs
  4. In the Workspace tab, select a mapping containing the java project folder
  5. In the process tab, Expand the template section
  6. Click the New button (first build definition for this Team Project only)
  7. Browse to the AntBuildTemplate.xaml checked in earlier
    1. Your choice whether or not to copy it into the current Team Project or use the central copy
  8. Enter in the desired build properties (see Ant Build Template Arguments for a description of the parameters)
  9. Save the build definition

Customize Build Process Template (Optional)

  • Add the assemblies to C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies. If this is not done, the workflow editor displays this activity as an error.
  • Make a copy of AntBuildTemplate.xaml
  • Open the new build process template in Visual Studio 2010
  • Add the AntBuildActivity to the Toolbox - http://msdn.microsoft.com/en-us/library/dd797579.aspx
  • Customize the build process as necessary. See TFS 2010 Team Build Guide for more on creating custom build process templates.

Notes

  • Not all options have been tested
  • Only tested using Java JDK 1.6.0_25 and Ant 1.8.3

Last edited Jul 11, 2012 at 10:12 PM by dpachla, version 4

Comments

No comments yet.