views:

45

answers:

1

It is possible to take the source code directly from a svn repository and analyze it with sonar? Or configure sonar just to run a Checkstyle or pmd plugin for certain sources? I need to do this on non-maven projects.

A: 

Yes, you just need to write a maven or ant script to check out the latest from SVN first, then run the sonar:sonar command.

It looks like Sonar forces you to create a pom.xml file and install maven2, even for a non-mavenized project: http://docs.codehaus.org/display/SONAR/Collect+data#Collectdata-NonMavenprojects%28sonarlightmode%29

(fyi - Sonar is dead easy with a mavenized project, but in any setup the key will be in getting in the habit of looking at and using the results of Sonar to improve development. That's the hard part.)

MikeG

related questions