EditDescription
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.
EditUsage
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.
EditExample 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>
EditSource
Martin Woodward's original blog post on the topic