Tuesday, May 7, 2013

Generating Sonar reports using maven




Steps to follow the generate Sonar reports:
1. Download and Unzip the Sonar version corresponding to your Maven version from http://www.sonarsource.org/downloads/ . example – version 3.5.1
2. Download plugins from http://docs.codehaus.org/display/SONAR/Sonar+PDF+Plugin and place under the folder “sonar-3.5.1\extensions\plugins” which is downloaded in step 1.
3. Sonar dependency to the POM file

 4. Run the batch file \sonar-3.5.1\bin\windows-x86\StartSonar.bat.
5. Use the maven command mvn sonar: sonar to generate the Sonar report (You will have to increase the Heap size via the JMV arguments).
6. The report will be generated at localhost:9000
7. We have attached the sonar PDF reports in the mingle

Note: Increase Heap size in eclipse in case of generating sonar report from eclipse:
      -Xms512m -Xms1024m
If we use command prompt to generate sonar report the set environment variable:
MAVEN_OPTS: -Xmx1024m

No comments: