A new Hudson plugin for a closer integration with Sonar
Continuous integration (CI) has become a centerpiece of software development lifecycle. Since Sonar is implemented as a maven plugin, it can be easily integrated with any CI engine : the engine acts as the scheduler for Sonar’s daily runs. You can even imagine to use the well known but a bit outdated cron scheduler to launch the maven goal “mvn org.codehaus.sonar:sonar-maven-plugin:1.4.2:sonar” on each project you want to analyse.
At this point in time, you are probably wondering : ok, but why would I need a plugin to integrate Sonar with Hudson, the very popular, open source and easy to use CI engine ? Is it possible to get an even more seamless integration ?
In fact, when you face a real enterprise context, you need to configure your setting.xml file by hand on your integration machine and copy/paste the Sonar maven goal for each project under control : 10, 50, 100, 200 times … Life will be easier if you can :
- Prevent edition of the setting.xml file and directly edit and view the Sonar configuration from Hudson
- Define the Sonar maven goal only once and use it as often as often as you want
We’ve developed a Hudson plugin to provide those two missing features. All configuration is done online and is shared across projects, you can enable/disable Sonar analysis in one click for all your projects. Obviously, you still can override Sonar parameters at the project level. Imagine for instance, on a given project you don’t want to import and display source code through Sonar interface for security reason (SONAR-306).