Java builds using Ant/Team Build 2010 can be configured easily with help of Team foundation Server build extensions power tools.
Prerequisites
We can setup Java builds using Ant scripts.
Here are the software/tools required on the Build server (Assuming TFS build has been already setup on this server).
1. Install Java JDK
2. Install ANT 1.8.x
3. Define ANT_HOME and JAVA_HOME
4. Install Team Foundation Server Build extensions power tool August 2011 (http://visualstudiogallery.msdn.microsoft.com/2d7c8577-54b8-47ce-82a5-8649f579dcb6/)
At the client machine (Optional to verify the ant script at client machine)
1. Install Java JDK
2. Install Apache ANT 1.8.x
3. Define ANT_HOME and JAVA_HOME
4. Install Eclipse helios or higher
5. Install Team Explorer Everywhere eclipse plug-in
6. Ant script to compile the code (We can create, if this is not available)
Steps
Step 1: In Eclipse on “Team Explorer”, right click on the Builds node (on the TFS Project) and select “New build Definition”
Step 2: Create build
Step 3: Setup the build triggers. If you need CI build, choose the “Continuous Integration – Build each check-in”
Step 4: Choosing the workspace mapping.
Select the TFS source folder where you have source and the compile ant script
Step 5: Build defaults. Specify the build controller and drop location
Step 6: Creating team build proj file. Click on “Create” button
Select “MSBuild Configuration from Existing Ant Buildfile” and click next
Browse and select the ant build file and click finish
Build has been created
Step 7: Queue the build
Step 8: Build Succeeded.
No comments:
Post a Comment