How to increase Sonar java heap size?

五迷三道 提交于 2019-12-11 01:48:37

问题


I am analyzing quite a large project with Sonar. The first few runs went OK but now I get error. Something to do with timemachine and violation analyzer:

java.lang.OutOfMemoryError: GC overhead limit exceeded
at 
org.sonar.plugins.core.timemachine.ViolationTrackingDecorator.mapViolations(ViolationTrackingDecorator.java:131)
    at org.sonar.plugins.core.timemachine.ViolationTrackingDecorator.decorate(ViolationTrackingDecorator.java:70)

I execute Sonar using ANT. Can I increase the java heap size somehow?


回答1:


The Sonar ANT task executes as part of ANT so you need to set the JVM heap using the standard ANT environment parameter. For example:

export ANT_OPTS=-Xmx256m


来源:https://stackoverflow.com/questions/12746292/how-to-increase-sonar-java-heap-size

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!