Team Foundation Build Recipes

Building Java Applications

Modified: 2008/02/02 12:44 by Eugenez - Categorized as: Team Build Recipes
Edit

Description

To build Java applications, you can call Ant from inside your Team Build TFSBuild.proj files. While this is possible using a simple Exec task, the following information discusses the usage of a special Ant task for MSBuild that will execute Ant and ensure that information about that build is sent to your log files and the appropriate steps added to your build report.

Edit

Usage

For more details, see Martin Woodward's original blog post on the topic. Basically, it requires the use of a custom MSBuild task to call Ant that feeds back the appropriate data into TFS.

Edit

Example Usage

 
<UsingTask TaskName="Teamprise.Build.Ant" 
           AssemblyFile="Teamprise.Build.dll"/>

...

<Target Name="CoreCallAnt">

  <Ant TeamFoundationServerUrl="$(TeamFoundationServerUrl)" 
    BuildFile="$(SolutionRoot)\java\HelloWorld\build.xml" 
    BuildUri="$(BuildUri)" 
    AntHome="$(ANT_HOME)" 
    JavaHome="$(JAVA_HOME)" 
    Flavor="@(ConfigurationToBuild -> '%(FlavorToBuild)')" 
    Platform="@(ConfigurationToBuild -> '%(PlatformToBuild)')"   
    Properties="BinariesRoot=$(BinariesRoot);BuildNumber=$(BuildNumber);SourceGetVersion=$(SourceGetVersion)" />

</Target>

Edit

Source

Martin Woodward's original blog post on the topic

© 2008 William Bartholomew blog.bartholomew.id.au

Powered by screwturn wiki