-
Select the "
Build
" tab.
-
Click the "
Add build step
" and select "Invoke top-level Maven targets
".
A new section (Invoke top-level Maven targets) will open to let you configure Maven:
-
Maven Version: select any of the already installed maven versions ("
apache-maven-3.6.2
").
-
Goals:
clean deploy
-
Click again the "
Add build step
" and select "Invoke top-level Maven targets
".
A new section (Invoke top-level Maven targets) will open to let you configure Maven:
-
Maven Version: select any of the already installed maven versions ("
apache-maven-3.6.2
").
-
Goals:
sonar:sonar
Note that you may get this error when Jenkins build your project:
To fix this error go SonarQube (
http://localhost:9000/)
-
Click on "
Administration
"
-
Click on "
Configuration
" dropdown and select "General Settings
"
-
Click on "
SCM
"
-
Set a "
true
" the "Disable the SCM Sensor
"
-
Click on "
Save
"