April 26, 2020
Estimated Post Reading Time ~

SonarQube PDF report generation - Code Review

Sonarcube 4.5.7 version.
The pdf report plugin 1.4 version from.
Copy and paste the pdf report plugin to ../extensions/plugins/
Start the server by running ../bin/StartSonar.bat.



Once the server is up, create a sonar-project.properties file in either root path or sub-module of the codebase.

o Eg: root path: ../GIT clone/<Parent folder>/
o Sub module path: ../GIT clone/<Parent folder>/<module>
Sample sonar-project.properties file
# Required metadata
sonar.projectKey=org.sonarqube:java-simple-sq-scanner
sonar.projectName= <<Give any name>>
sonar.projectVersion=1.0

# Comma-separated paths to directories with sources (required)
sonar.sources=src

# Language
sonar.language=java


# Encoding of the source files

sonar.sourceEncoding=UTF-8


PDF can be viewed in different ways:
Go to codebase path either root or module folder from the command prompt and run mvn sonar:sonar
PDF will be generated in target/sonar/ folder.
o Goto Sonarcube server http://localhost:9000 and login as admin/admin.
§ In dashboard add a widget called Pdf Report. Rerun mvn sonar:sonar from the command prompt


In the PDF report widget, you can see the generated pdf.


By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.