-
Notifications
You must be signed in to change notification settings - Fork 7
Run Sonar Locally
Damien Gallagher edited this page Jul 5, 2021
·
4 revisions
- Navigate to the app directory
- To run the Sonar docker image, execute the following command
docker-compose -f src/main/docker/sonar.yml up -d
- Sonar is now available at the url http://localhost:9001
- Login to Sonar. Default username is admin and default password is admin
- You will be asked to change the default password.
- As you can see, there are no projects available. To analyze the SmallWindow21 project - execute the following command
./mvnw -Pprod clean verify sonar:sonar
- When that command completes successfully, you will be able to see the Sonar results at the page http://localhost:9001/projects
- Navigate to the app directory and then the scripts directory
- Execute the script Run Sonar Analysis.bat or Run Sonar Analysis.sh if running on Linux or Mac
- This scripts starts the Sonar docker image and executes the Sonar analysis. It is just a convenience method.
Note: Sonar should already be running
- Navigate to the app directory
- Execute the following command
./mvnw initialize sonar:sonar
- Navigate to the app directory and then the scripts directory
- Execute the script ReRun Sonar Analysis.bat or ReRun Sonar Analysis.sh if running on Linux or Mac
- This scripts re runs the Sonar Analysis. It is just a convenience method.