Integrating Jenkins, Maven, Sonarqube, Github, and Eclipse IDE...
Prerequisite: Setup maven, Jenkins, Sonarqube locally
A. Integrate Github and Eclipse As Previously done in the above Experiment.
(b. Using Eclipse IDE Add Maven project to Github Repo you first created)
Or
directly upload the project to GitHub.
B. Instead of using Maven Cli configure Jenkins and give the path of the Maven Goal and Plugin.
Command : “mvn clean install sonar:sonar
-Dsonar.host.url=http://localhost:9000 -Dsonar.analysis.mode=publish”
Since the pom file is not on a root folder it will not detect and will give an error, so give the name of the folder in which POM is stored.
like: LAB2.1_Sonarqube/pom.xml
C. Build the Project and IT will automate the project at Sonarqube.
Check your Build on Console Output
D. Refresh and Check Sonarqube.
Thank You !!!