How to manage the measures of multiple SCM branches separately for my project ?
Add the following maven property to your pom.xml :
I get a 'java.lang.OutOfMemoryError : Java heap space' when I execute the maven plugin
Increase the maven available memory by setting set MAVEN_OPTS=-Xmx512m on windows or export MAVEN_OPTS=-Xmx512m on *nix boxes.
I get a 'java.lang.OutOfMemoryError : PermGen space' when I execute the maven plugin
Increase the maven available perm gen space memory by setting set MAVEN_OPTS=-XX:MaxPermSize=256m on windows or export MAVEN_OPTS=-XX:MaxPermSize=256m on *nix boxes.
How can I use Clover instead of Cobertura for code coverage measures ?
Just copy your Clover license file to the root directory of each module. The sonar maven plugin automatically detects its presence then executes Clover. Example on the sonar project itself (see clover.license file)
Sonar refuses to connect to MySql on my Linux distribution
On some Linux distributions, MySql is configured by default to listen to request via an Unix socket file, which is unfortunatly not compatible with Sonar (TCP/IP required).
To fix this issue edit "/etc/my.conf" and make sure that 'skip-networking' is commented to enable TCP/IP.
I have a code coverage of 0% with clover
Clover maven plugin does not always plays nice with "provided" dependencies scope, this issues creates a zero code coverage value under sonar.
If you have such issue, to check that everything is well configured, add in you pom :<plugin>
and launch mvn clean clover:instrument clover:clover.
If the clover compilation is failing, check your pom and add missing dependencies until it pass. This should fix the zero code coverage issue.
Is it possible to add, remove, or customize a report plugin used by Sonar ?
No, it's not yet possible.
Does Sonar work for maven multi-modules projects ?
Yes. More information on the Maven site.
I would like to be able to hide/ignore a maven subprojet in sonar site.
You can't do that.
A workaround is to build the modules to ignore within a profile. Example :
These 2 modules will not be processed by sonar. To build, you must execute "mvn install -Pextra-modules".
I get a ParseException when using @SuppressWarning tag in my source code.
This is unfortunatly a JavaNCSS bug (see http://jira.codehaus.org/browse/MJNCSS-16).
We don't know if it will be fixed quickly. So we're looking for another plugin to calculate such basic measures (lines of code, complexity, nb of classes/methods). Do not hesitate to tell us if you know one ;o)
Is there a way to send a email when a project as analytical drop ?
Not for the moment but we've already thought about it (http://jira.codehaus.org/browse/SONAR-52)
Can I deploy sonar on a JEE application server ?
A WAR file can be built since sonar 1.3. Only Tomcat 5.5 was tested.
The maven plugin fails with the error 'Embedded error: Error occured during file http://localhost:9000/rules_config/checkstyle.xml download'
The problem is just that you do not use the same versions between the server and the maven plugin. The server is 1.1 whereas you use the deprecated maven plugin ch.hortis.sonar:sonar-maven-plugin. The goal to execute is :mvn org.codehaus.sonar:sonar-maven-plugin:1.1:sonar
How the database size evolves over time ?
There are globally two types of data : high-level measures for time machine (all measures at project level, displayed on the dashboard) and low-level measures displayed on breakdown pages (measures and rule violations at class level). Those last ones are automatically purged to keep only last day data.
Here are some statistics of our MySQL5 database for 80 projects (various size, from simple libraries like commons-lang to big enterprise tools like cocoon or jackrabbit) :
- high level measures : 200 Mo / month
- low level measures : 1'800Mo (constant in time), match 162'000 java files.
Those values includes data and index sizes.