Frequently Asked Questions
Maven fails with 'java.lang.OutOfMemoryError'
Increase the maven available memory by setting the environment variable :
I get a SecurityException when I execute the maven plugin
The message of the root exception is
The CGLIB library available in your Maven repository is certainly signed which is not the case on IBIBLIO repository. Perhaps you or your Maven administrator have signed this jar to include it into a Java Web Start application. Unfortunately signing CGLIB jar file breaks Hibernate's use of CGLIB, as it generates proxy classes in the same package (org.sonar.commons.database.* for our context) as the original class. But the original Sonar class is not signed and the new proxy class is, generating a java.lang.SecurityException.
You must also sign Sonar libraries in your Maven repository or used unsigned CGLIB library.
Maven mirrors : the maven plugin fails to resolve org.codehaus.sonar.runtime.* dependencies
Sonar embedds its own maven repository which is used by the Sonar maven plugin to download all Sonar extensions like pmd, checkstyle, findbugs, etc. If you get this error, it's certainly because your Maven configuration prevents Sonar from accessing its own Maven repository. Your maven settings.xml file must certainly contain a section called <mirror> which should look like this :
According to this section, Maven redirect all call to a given repository to this central maven repository, so Sonar maven repository is never touched and Sonar maven plugin fails to resolve org.codehaus.sonar.runtime.* dependencies. Two solutions to solve this issue :
- If and only if you have Maven version 2.0.9 or higher, just change the value of <mirrorOf> parameter in your setting.xml file, replace "*" by ",!sonar"
- Configure your central maven repository (eg. nexus, archiva or artifactory) to use the Sonar internal repository (http://sonar:9000/deploy/maven). If you use Nexus, take a look to the section "Declare the Sonar Maven Repository inside Nexus" in the Full installation in 5 steps.
Corbertura exception on Linux System while accessing the cobertura.ser file
When reading the cobertura.ser file, the Cobertura Maven plugin tries to get a lock on that file. This locking mechanism generates an exception on Linux Systems SONAR-172.
The current workaround is to add the following lines to the pom.xml file (thanks to Wouter de Vaal) :