简体   繁体   中英

Sonarqube analysis for non maven projects using Jenkins

I am using maven goal sonar:sonar to analyze all the maven projects in my jenkins using sonarqube4.2 and running the goal sonar:sonar as a build step.

I have a situation where couple of teams have projects with only UI code in it and does not follow maven structure.

Src folder does not exist. Could someone tell me how to specify the source folder in this case since sonar:sonar would only work for maven projects and I dont have a sonar runner in place.

Thanks in advance.

Regards, Upen

You just have to use the SonarQube Runner build step instead of the SonarQube Maven PostJob. With this build step, you have to specify the properties by yourself so you can put whatever you want. For instance:

sonar.projectKey=my:project
sonar.projectName=My project
sonar.projectVersion=1.0
sonar.sources=.
sonar.exclusions=build/**/*

You can find more on the "Adding SonarQube Runner" documentation page of the SonarQube Jenkins plugin .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM