Fork me on GitHub

Usage

The default embedded database is recommended for evaluation only. It must be replaced by a database like MySql, PostgreSQL, SQLServer 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 server must be configured to access the same database. Read the installation guide to get more details.

Note: the JDBC driver is automatically downloaded from server. It does not need to be defined as a project dependency.

MySQL

<profiles>
  <profile>
    <id>sonar</id>
    <properties>
      <sonar.jdbc.url>jdbc:mysql://localhost:3306/sonar?useUnicode=true&amp;characterEncoding=utf8&amp;rewriteBatchedStatements=true</sonar.jdbc.url>
      <sonar.jdbc.username>sonar</sonar.jdbc.username>
      <sonar.jdbc.password>sonar</sonar.jdbc.password>
    </properties>
  </profile>
</profiles>

PostgreSQL

<profiles>
  <profile>
    <id>sonar</id>
    <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>
    </properties>
  </profile>
</profiles>

Oracle

<profiles>
  <profile>
    <id>sonar</id>
    <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>
    </properties>
  </profile>
</profiles>

SQLServer

<profiles>
  <profile>
    <id>sonar</id>
    <properties>
      <sonar.jdbc.url>jdbc:jtds:sqlserver://localhost/sonar;SelectMethod=Cursor</sonar.jdbc.url>
      <sonar.jdbc.username>sonar</sonar.jdbc.username>
      <sonar.jdbc.password>sonar</sonar.jdbc.password>
    </properties>
  </profile>
</profiles>