-
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:
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.2:sonar (default-cli) on project mtitek-svn-test-a:
Error when executing blame for file pom.xml:
svn: E170001: Authentication required for '<http://localhost:80> Subversion Repository' -> [Help 1]
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
"