April 26, 2020
Estimated Post Reading Time ~ 1 mins

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.

sonar1

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
sonar2

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
sonar3

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


By aem4beginner

No comments:

Post a Comment

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

Ad Blocker Detected :(

Please consider supporting us by disabling your ad blocker.

Please Disable your adblocker and Refresh the page to view the site content.