Follow the following steps to run SonarQube in Java Projects:
-
Clone this repository in your computer.
-
SonarQube:
- Log in into SonarQube: http://10.3.2.190:8080/
- Create a project on SonarQube. You will need to create/use the key to configure the project.
-
Project bookstore:
-
Project webgoat and wsvd-bench:
- Edit the
pom.xml
, to change the<name>
property. Replace YOUR_NUMBER by your student number. - Edit the
add-sonarqube.sh
with the key information provided by SonarQube.
- Edit the
-
Build the docker images in your computer, with the following script: build.sh.
-
Run the container with the following script: "run.sh". If the script runs successfully, you will be inside the Docker container with the projects.
-
Run the
add-sonarqube.sh
for each one of the projetct. It will run ant/maven, and invoke SonarQube profile, which analyses the source code and send the results to SonarQube. -
Analyze the results in the Web Interface of SonarQube. If you fix any issue, you can perform another analysis by the SonarQube.
Authors:
- José D'Abruzzo Pereira [email protected]
- Nuno Antunes [email protected]