If you want to set a default Sonar configuration for all your Maven projects to run against, you can add your settings as a profile in the profiles section in your default settings.xml in either your ~/.m2 dir or your maven_install_dir/conf dir (depending which you’re using)
<profiles>
<profile>
<id>sonar</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<!-- MySQL -->
<sonar.jdbc.url>
jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8
</sonar.jdbc.url>
<sonar.jdbc.driver>com.mysql.jdbc.Driver</sonar.jdbc.driver>
<sonar.jdbc.username>your_sonar_db_userid</sonar.jdbc.username>
<sonar.jdbc.password>your_sonar_pwd</sonar.jdbc.password>
</properties>
</profile>
</profiles>
