Jenkins(or Hudson) and Sonar are perhaps two of the most mature open source tools available today for implementing continuous integration. They comes with a plethora of features that make life easier at monitoring and managing quality of multiple software development projects. Out of the box, Sonar is designed for Maven project. However, it can be configured to work with Ant projects. The following steps show you how to achieve this:
1. Download this plugin Sonar Ant Jar
2. Copy the jar file into <ANT_HOME>/lib
This is very important, otherwise your project would not compile properly.
Ant projects typically come with <PROJECT>.properties and <PROJECT>.xml files. So, just add the following code snippets into the existing ant build file. The code snippets assume that Sonar has already been installed to run at http://localhost:8080/sonar with Postgresql database.
From the command prompt or inside your favourite IDE, run "ant -f myproject.xml sonar". This will take awhile depending on your project size. Once completed, myproject should show up on the project list inside Sonar.
Integrating with Jenkins/Hudson
Under "configure" panel, just add a new ant task to execute the "sonar" task.
1. For more details on Ant Task, see Analyse with Ant Task
2. For more details on Jenkins, see Jenkins
3. For more details on Sonar, see Sonar