This project serves as an example of a simple book management system with user and recommendation functionalities. It is a Java-based web application built with Quarkus, a Kubernetes-native Java stack tailored for OpenJDK HotSpot and GraalVM, crafted from the best Java libraries and standards.
- Book Management: Allows CRUD operations for books, including adding, updating, deleting, and retrieving book information.
- User Management: Enables CRUD operations for users, including adding, updating, deleting, and retrieving user information.
- Search: Provides a search functionality to filter books by title, author, and genre.
- Recommendation: Generates book recommendations for users based on their previous selections.
SonarQube is an open-source platform for continuous inspection of code quality to perform automatic reviews with static analysis of code to detect bugs, code smells, and security vulnerabilities.
-
Download and Install SonarQube:
- Download the latest version of SonarQube from the official website.
- Follow the installation instructions provided in the documentation.
-
Configure SonarQube:
-
sonar.jdbc.username= sonar.jdbc.password=
sonar.embeddedDatabase.port=9092
or configure for the database you wish to use.
-
sonar.web.port= sonar.search.port=
-
sonar.path.data=data sonar.path.temp=temp
-
Note: Check logs (
sonar.log
,web.log
,es.log
) for errors, common ones being related to disk space.
-
Install and Start SonarQube Service:
- Run sonarservice.bat install to install the SonarQube service.
- Run sonarservice.bat start to start the SonarQube service.
-
Start SonarQube:
- Execute the
StartSonar.bat
script to start the SonarQube service.
- Execute the
-
Access SonarQube Dashboard:
- Once SonarQube is up and running, access the dashboard via your web browser. The default URL is usually
http://localhost:9000
.
- Once SonarQube is up and running, access the dashboard via your web browser. The default URL is usually
-
Maven Plugin:
- Include the SonarQube Maven plugin in your project's
pom.xml
file:
<plugin> <groupId>org.sonarsource.scanner.maven</groupId> <artifactId>sonar-maven-plugin</artifactId> <version>3.11.0.3922</version> </plugin>
- Include the SonarQube Maven plugin in your project's
-
Configure Project Properties:
- Add the following SonarQube properties to your project's pom.xml file:
<sonar.projectKey>Your_Project_Key</sonar.projectKey> <sonar.projectName>Your_Project_Name</sonar.projectName> <sonar.host.url>http://localhost:9000</sonar.host.url>
-
Run SonarQube Analysis:
- Execute the following Maven command to run SonarQube analysis:
mvn clean verify sonar:sonar
- Execute the following Maven command to run SonarQube analysis:
SonarQube will analyze your code and provide insights into code quality metrics, security vulnerabilities, and code smells. Access the analysis results on the SonarQube dashboard to identify areas for improvement and ensure code quality standards are met.
For more detailed information on SonarQube and its features, refer to the official documentation.
SonarCloud is a static code analysis tool that provides insights into the quality and security of your codebase. It scans your code for bugs, vulnerabilities, code smells, and other issues, helping you ensure that your code is maintainable, reliable, and secure. To start using SonarCloud for your projects, you can configure analysis settings and set up automated scans for your projects. SonarCloud provides detailed reports and insights that you can use to improve the quality and security of your codebase. For more information, visit the SonarCloud website.