| Name | NAnt Builder |
|---|---|
| Version | 2.1.4 |
| Product Versions | 1.2.x/2.x |
| Author(s) | Ross Rowe |
| Homepage | http://confluence.atlassian.com/display/CODEGEIST/NAnt+Builder |
| Price | Free |
| License | BSD |
| JavaDocs | See nant_builder.zip |
| IssueTracking | http://developer.atlassian.com/jira/browse/NANT |
| Subversion URL | https://svn.atlassian.com/svn/public/contrib/bamboo/bamboo-nantbuilder-plugin or browse via fisheye |
| Download JAR | nant_builder-1.0.5.jar (supports 1.2.x)/nant_builder-2.1.4.jar (supports 2.x) |
| Download Source | nant_builder.zip |
Description/Features
A builder plugin that will allow configuration and execution of build files for .Net/Mono projects,
using NAnt , Msbuild and devenv
and also supports the parsing and displaying of NUnit and MBUnit test results.
The plugin also includes a devenv.com builder. This plugin will allow you to configure a single Bamboo instance handle building both your Java and .Net projects, which is especially useful if you have multi-discipline teams in your organization.
Prerequisites
In order to use the NAnt Builder, you must first install NAnt, which can be obtained from http://nant.sourceforge.net. In addition, you will also need to install an
appropriate version of the .Net framework, which can be downloaded from http://msdn2.microsoft.com/en-us/netframework/aa569263.aspx or the Mono framework, which can be downloaded from http://www.mono-project.com/Downloads.
This plugin has been tested using .Net Framework v2.0 on Windows XP and Mono v1.2 on OS X using both Bamboo v1.2.x and v2.0.x If you encounter any difficulties with this builder on other platforms, please let me know and I'll endeavor to resolve the issue.
Usage
Installation
Copy the nant_builder-2.1.4.jar file into your <BAMBOO_HOME>/webapp/WEB-INF/lib directory and restart Bamboo. Please note that nant_builder-2.X.X.jar supports Bamboo 2.x, and the nant_builder-1.X.X.jar supports Bamboo 1.x.
|
Make sure that any older versions of the plugin are removed first! |
NAnt
- Create a new NAnt Builder via the Builders tab on the Administration page. You should be able to select NAnt as a builder type, you will need to enter a label and include the location to the path to the NAnt directory.

- Once you have created a NAnt Builder, you can configure a project to use this builder via the Builder Configuration tab of the Configuration page. Here you can specify the name of the build file, the target to execute, NAnt options, environment variables, and the working sub directory.

NUnit/MBUnit
- If your build produces NUnit and/or MBUnit test results, then enter the location of the test result files on the Builder Configuration tab.

The builder will run in the same manner as the Ant and Maven builders ie. the build output will be captured by Bamboo and displayed on the Build Log page. A build will be deemed 'successful' (and thereby appear in the shiny green colour) if the NAnt build finishes with a return code of 0 and if the last 5 lines of the NAnt build include the words 'BUILD SUCCEEDED'. In addition, if the build has been configured to run NUnit tests, a build will be deemed successful if all the tests pass. If any of these conditions are not met, then the build will be deemed to have 'failed'.
devenv.com
A devenv.com builder as well, which works in the same sort of way as the NAnt Builder and includes the support for parsing and recording NUnit test results. The devenv.com executable is included as part of Microsoft Visual Studio and allows you to build a Visual Studio Solution from the command line.
You first need to add the Builder via the Administration page
Once the builder has been added, you can use this builder in your build's Configuration.
Msbuild
Similar to the devenv builder, support for Msbuild has also been included.
.NET Script/Command builds
Generic .NET Script and Command builders are included also. These builders allow you to specify a custom command or script to be used as part of a build's execution, but which allow the parsing and displaying of NUnit/MBUnit test results.
NCover
If your build produces NCover coverage files, then enter the location of the coverage result files on the Builder Configuration tab. Bamboo will then parse and display the NCover results when each build runs.
Jira Issues
The following lists the reported defects and enhancements that have been reported. If you encounter a defect, or if there is a feature that you'd like added to the builder, feel free to raise an issue at the Jira site, or drop me an email at piaross@gmail.com.
|
|
||||
|---|---|---|---|---|
| T | Key | Summary | Reporter | Status |
|
|
NANT-13 | Rename plugin to reflect generic .NET support | Ross Rowe |
|
|
|
NANT-12 | Support Console - Xml - Xsl plug-in mode | Bernardo Heynemann |
|
|
|
NANT-11 | NDepend Support | Bernardo Heynemann |
|
|
|
NANT-10 | Support NCover to generate Test Coverage results | Bernardo Heynemann |
|
|
|
NANT-9 | Argument information getting lost for Nunit Command Builder | Ross Rowe |
|
|
|
NANT-8 | Include msbuild support | Ross Rowe |
|
|
|
NANT-7 | Include MBUnit support | Ross Rowe |
|
|
|
NANT-6 | devenv suggestions from BAM-2546 | Mark Chaimungkalanont |
|
|
|
NANT-5 | NullPointerException when running remote builds | Ross Rowe |
|
|
|
NANT-4 | The Nant plugin shows incorrect Test Result location. | Ajay Sridhar |
|
|
|
NANT-3 | NUnit parser can't parse categories | Ajay Sridhar |
|
|
|
NANT-2 | NAnt command line options get quoted as one single argument | Stephan M�ller |
|
|
|
NANT-1 | Pass the build label through to NAnt | Ross Rowe |
|
Version History
Version 2 (supports Bamboo 2.x)
| Version | Date | Description |
|---|
| 2.1.4 | 29 July 2008 | Interim fix to BAM-2933 to allow replacement of predefined environment variables. Further details here |
| 2.1.3 | 7 July 2008 | Ensure that default values don't overwrite entered configuration |
| 2.1.2 | 19 June 2008 | Fixed some parsing issues of NCover reports |
| 2.1.1 | 17 June 2008 | NANT-10 Added initial support for NCover results |
| 2.1.0 | 8 June 2008 | Updated code to use correct mechanism to retrieve working directory |
| 2.0.9 | 27 May 2008 | Added ability to set specific directory containing test results - this was causing problems for users with Perforce repositories |
| 2.0.8 | 22 May 2008 | NANT-9 Command Builder arguments were disappearing |
| 2.0.7 | 17 May 2008 | NANT-8 Included support for msbuild.exe |
| 2.0.6 | 17 May 2008 | Added a Command Builder that handles parsing of NUnit and MBUnit result files |
| 2.0.5 | 16 May 2008 | NANT-7 Included support for MBUnit results |
Version 1 (Supports Bamboo 1.2.x)
| Version | Date | Description |
|---|---|---|
| 1.0.5 | 17 May 2008 | NANT-8 Included support for msbuild.exe |
| 1.0.4 | 21 April 2008 | Added a new Script builder that handles parsing of NUnit results (this has also been included in 2.0.3 |
| 1.0.3 | 24 January 2008 | NANT-4 Fixed test results directory being overridden on the Edit Configuration page |
| 1.0.2 | 4 October 2007 | NANT-3 Ensure Category and Categories elements are handled correctly |
| 1.0.0 | 12 May 2007 | Final version for submission |
| 0.9.3 | 12 May 2007 | Added a devenv builder |
| 0.9.2 | 3 May 2007 | NANT-1 Pass through 'BambooBuildLabel' property to NAnt |
| 0.9.1 | 30 April 2007 | Added support for parsing/displaying NUnit results |
| 0.9.0 | 29 April 2007 | Initial stable version |

Comments (7)
May 01, 2007
Mike Roberts says:
Hi Ross, Good to see someone's looking at doing this! My biggest feature sugges...Hi Ross,
Good to see someone's looking at doing this! My biggest feature suggestion is that you pass through the build label as a property to NAnt so that projects can use this to create the correct dll version. We do this in CCNet, then projects can use NAnt's <asminfo> task to create the version number.
If in doubt, also look at CCNet's Nant builder docs (http://confluence.public.thoughtworks.org/display/CCNET/NAnt+Task) .
I'm not doing .NET right now but if you'd like to throw some ideas at me shoot me a mail (my email address is a link on my blog at http://www.mikebroberts.com/)
Mike (ex- CCNet Project lead)
May 01, 2007
Ross Rowe says:
Hi Mike, thanks for the suggestion, I'll definitely have a crack at including th...Hi Mike, thanks for the suggestion, I'll definitely have a crack at including this feature!
Cheers,
Ross
May 03, 2007
Ross Rowe says:
Just FYI, I've put up a new version that passes the build label in a 'BambooBuil...Just FYI, I've put up a new version that passes the build label in a 'BambooBuildLabel' parameter to NAnt.
Cheers,
Ross
May 09, 2007
Matthew Janulewicz says:
Excellent\! Just what we've been looking for\! At least the NUnit tests part, wh...Excellent! Just what we've been looking for! At least the NUnit tests part, which brings me to a question. A request, actually.
We use a custom builder that just calls VisualStudio's devenv.com app to do commandline builds. Is there any possible way the NUnit tests parser thingy could be utilized in non-Nant builds?
It's easy enough to wrap our debug builds in Nant, but it would be cool to be able to use NUnit tests in arbitrary builds (with arbitrary builders.)
Thanks for making this plugin! Extremely useful!
May 10, 2007
Ross Rowe says:
Hi Matthew, thanks for your feedback and suggestion. The NUnit results parsing l...Hi Matthew, thanks for your feedback and suggestion. The NUnit results parsing logic is invoked from the NAnt Builder itself, but I'd imagine it would be pretty easy to create a devenv Builder that would build the appropriate command line to execute and which would also locate and parse NUnit results in a similar manner to the NAnt Builder. I can have a crack at adding a devenv Builder and I'll let you know when I've got something that you can try out. Feel free to drop me a line at piaross at gmail dot com if you'd like to discuss it further.
Cheers,
Ross
Aug 24, 2007
Matthew Janulewicz says:
It might be just that I'm dumb, don't understand Ant/Nant paths, etc, but is the...It might be just that I'm dumb, don't understand Ant/Nant paths, etc, but is there a way to include NUnit results files that are outside of the build root? I need to go up about three directories and back down into another tree to get the .xml our NUnit tests generate but I can't for the life of me figure out the syntax.
I guess I could easily just have the build script copy it where I want it, but that seems less elegant to me, and you know, appearances count.
Thanks! Love this plugin/functionality!
Aug 24, 2007
Ross Rowe says:
Hi Matthew, I haven't extensively tested it, but you should be able to configure...Hi Matthew, I haven't extensively tested it, but you should be able to configure the test location to do what you want. The NAnt Builder uses the test results location with respect to the source directory (ie. where the code has been checked out to). However, if you specify a directory (instead of a specific NUnit xml file or even *.xml), then the builder will search for all .xml files residing in that directory. So, if you have '../../../test/results', then so long as that path is navigatable from the build source directory, the NAnt Builder should process all the .xml files in that directory.
Cheers,
Ross