Reputation: 688
I have checked the link:sonarqube issues report,but not clear on how to achive it during maven build.
Upvotes: 8
Views: 19976
Reputation: 6855
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.
Upvotes: 2
Reputation: 5136
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
Upvotes: 7