Force Maven Sonar Plugin to pick up sonar-project.properties file

1,592 views
Skip to first unread message

Dan

unread,
Oct 31, 2017, 3:56:26 AM10/31/17
to SonarQube
Hello all,

I am trying to use the sonar-maven-plugin scanner to scan all types of projects, not just java projects currently we are not able to run the standalone sonar scanner in our CI environment so this is our only option for now. However some of the projects have a 
sonar-project.properties file, this file is not being picked up by the scanner, since these are multi-module and munti-language its not practical to have these settings in a pom.xml file, is there a way to force the sonar maven plugin to pick up the sonar-project.properties file?

G. Ann Campbell

unread,
Oct 31, 2017, 8:24:46 AM10/31/17
to SonarQube
Hi,

The SonarQube Scanner for Maven won't pick up sonar-project.properties files. It's designed to pick up the values it needs from pom.xml files. Your choices are to either munge together pom files, or to switch to the SonarQube Scanner.


Ann

Dan

unread,
Oct 31, 2017, 2:45:47 PM10/31/17
to SonarQube
Hi Ann, thanks for the information. Hum, this is not very flexible, for instance when its impossible to install the SonarQube Scanner in CI Agents Bamboo/Jenkins, etc... In particular having to add a pom.xml file to projects that are not Java seems a bit odd :/ guess we will have to live with this, is it worth opening an issue? Or its something that is completely outside of scope for now?

G. Ann Campbell

unread,
Oct 31, 2017, 2:48:29 PM10/31/17
to Dan, SonarQube
Hi,

There's nothing but your own requirements that says you have to use Maven for your non-Java project. If you really don't want to write a pom, then switch to SonarQube Scanner.

We will not be adding functionality to have the SonarQube Scanner for Maven (or Gradle, or MSBuild) read sonar-project.properties files.


Ann



---
G. Ann Campbell | SonarSource
Product Manager
@GAnnCampbell

--
You received this message because you are subscribed to a topic in the Google Groups "SonarQube" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarqube/2bTXrSvYWH0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/92748f3c-a1c3-41ad-b42c-634e5e1ad87e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages