Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate html report for issues reported using sonarqube-5.4 and maven?

I have checked the link:sonarqube issues report,but not clear on how to achive it during maven build.

like image 376
S.B Avatar asked Mar 22 '16 06:03

S.B


2 Answers

As documented the Issues Report Plugin is not compatible with versions 5.1 and greater. SonarLint for Command-Line should be used to get the same feature. It is simple to enable with Maven:

mvn sonar:sonar -Dsonar.analysis.mode=preview -Dsonar.issuesReport.html.enable=true

Paths to the generated HTML reports are displayed in logs:

[INFO] HTML Issues Report generated: /xxx/target/sonar/issues-report/issues-report.html
[INFO] Light HTML Issues Report generated: /xxx/target/sonar/issues-report/issues-report-light.html
[INFO] ANALYSIS SUCCESSFUL
like image 138
Simon Brandhof - SonarSource Avatar answered Oct 10 '22 04:10

Simon Brandhof - SonarSource


Cycle of steps.

mvn clean install
mvn sonar:sonar -Dsonar.issuesreport.html.enable=true

As per the source, build should happen before the analysis. sonar:sonar triggers maven surefire plugin to execute.

like image 21
Vinay Veluri Avatar answered Oct 10 '22 04:10

Vinay Veluri