Step 5 - Configure Maven
Sonar uses a Maven plugin to analyze sources and to inject measures into the database. That's why database properties must be defined into the Maven configuration. Edit settings.xml file, located into $MAVEN_HOME/conf or ~/.m2, and add the parameters from step 3.
If data collection and server are on different boxes, set the server host with the property 'sonar.host.url'.
Warning : With Sonar 2.2, the property sonar.host.url MUST NOT end with a slash character. Otherwise, JDBC driver is not found by the Sonar Maven plugin. See SONAR-1685.
It is recommended to increase the Java heap memory. It avoids getting OutOfMemoryError failures. Set the MAVEN_OPTS environment variable :