Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 24 Next »

Frequently Asked Questions

Table of content

Maven fails with 'java.lang.OutOfMemoryError'

Increase the maven available memory by setting the environment variable :

Maven 2.0.9 fails with 'java.lang.StackOverflowError'

org.apache.maven.wagon libraries have been included in the core of Maven 2.0.9. Projects should not define these extensions anymore in their poms. That's the origin of this curious error. So just remove the following from your pom.xml :

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 commercial jdbc driver, pmd or checkstyle extensions, etc. Your maven settings.xml file must 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, just change the value of <mirroOf> parameter in your setting.xml file by adding : "*,!sonar"
  • Configure your central maven repository (eg. nexus, archiva or artifactory) to use the Sonar internal repository (http://sonar:9000/deploy/maven). Don't worry if this URL returns 404, it's normal. To check if it works, browse to http://<servername>/deploy/maven/README.
    Note that this is a snapshots repository, so do not forget to set the repository policy to 'snapshot'.
  • No labels