The embedded database is recommended for demos and tests only. It must be replaced by a database like MySql, Postgresql or Oracle in production environment. This setting is generally set in Maven settings.xml, rather than duplicating it in all project poms. Note that the Sonar server must be configured to access the same database. Read the installation guide to get more details.
Note: JDBC driver is automatically downloaded from Sonar server. It does not need to be defined as project dependency.
<profiles>
<profile>
<id>sonar</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<sonar.jdbc.url>jdbc:mysql://localhost:3306/sonar</sonar.jdbc.url>
<sonar.jdbc.username>sonar</sonar.jdbc.username>
<sonar.jdbc.password>sonar</sonar.jdbc.password>
<sonar.jdbc.driver>com.mysql.jdbc.Driver</sonar.jdbc.driver>
</properties>
</profile>
</profiles>
<profiles>
<profile>
<id>sonar</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<sonar.jdbc.url>jdbc:postgresql://localhost/sonar</sonar.jdbc.url>
<sonar.jdbc.username>sonar</sonar.jdbc.username>
<sonar.jdbc.password>sonar</sonar.jdbc.password>
<sonar.jdbc.driver>org.postgresql.Driver</sonar.jdbc.driver>
</properties>
</profile>
</profiles>
<profiles>
<profile>
<id>sonar</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<sonar.jdbc.url>jdbc:oracle:thin:@localhost/XE</sonar.jdbc.url>
<sonar.jdbc.username>sonar</sonar.jdbc.username>
<sonar.jdbc.password>sonar</sonar.jdbc.password>
<sonar.jdbc.driver>oracle.jdbc.driver.OracleDriver</sonar.jdbc.driver>
</properties>
</profile>
</profiles>