I just use the SonarQube-Plugin for Jenkins and configured the Jenkins job to execute the SonarQube Scanner. If I'm leaving the analysis properties in the UI and the sonar-scanner.properties blank the mandatory properties are missing. According to this question at least the sonar.projectKey
should be automatically derived from the maven properties <groupId>:<artifactId>
. If I set the sonar.projectKey
and the sonar.sources
properties directly everything works fine. But how can I achieve that the the maven properties <groupId>:<artifactId>
are used by the plugin?
Edit: If I set the Analysis properties in the UI to:
sonar.projectKey=${POM_GROUPID}:${POM_ARTIFACTID}
and sonar.sources=.
as described here
it works fine. But it has no real advantage because I have to insert the same information to every job. It would be better if I can set these properties in a central file like the sonar-scanner.properties because all project dependent information is set by maven properties.