We run SonarQube analyses for our Java projects via Maven. Maven somehow does this automagically; all we did was add the sonar-maven-plugin to our pom.xml>
sonar-maven-plugin
I would opt for the maven profiles. Each profile would have its own properties.
I hope this helps.