Extending the NAnt build runner

Is there any documentation on how to extend the current NAnt runner? I have a plugin that extended the the NAnt runner from 5.0, but things have changed in 5.1.


We have moded NAnt runner from obsolete runners api to the current runner API. Could you please describe your plugin in more detail and the issues you was faced with 5.1 NAnt runner.


I managed to implement it successfully. After some poking around with it I have it running.

My plugin does 2 things: it provides a more friendly GUI for selecting build configuration options and it automatically determines the agent requirements from those configuration options.


Nice to read that.

Have you tied playing with TeamCity property references in the configuration? (i.e. %system.build.number%). TeamCity includes add such references in build agent compatibility checkings. Does your extension use it? Does TeamCity implementation miss something?

Could you please show some example of compatibility and options.


Actually, the TeamCity plugin works perfectly. That is why I wanted to wrap it rather than write my own. Basically, my plugin is a wrapper around the TeamCity NAnt plugin that just provides a nicer configuration GUI to set the system properties for our NAnt script. It then inserts the agent requirements based on the configuration options selected. For example, if unit test code coverage is enabled, the requirement for the correct version of PartCover is inserted.

One problem was that the NAnt plugin is loaded in a separate class loader on the server so I could not inject the NAntRunType into my plugin. I include the NAnt plugin jars on the server side and create a NAntRunType instance directly. I did have to remove the plugin XML from those jars so I could include them with my plugin. The other problem was that I could not seem to inject the constructor args for the NAntBuildServerFactory. No suitable bean could be found. I had to define those beans myself within my plugin. This could be that I don't know a great deal about Spring, though. Everything seems to be working just fine now.


Please sign in to leave a comment.