[英]Sonar - OutOfMemory Error on Analysis of project with new Rules
I'm trying to analyze my Java project with Sonar. 我正在尝试使用Sonar分析我的Java项目。 I've specified the sources and the class directories in the sonar-properties file. 我已经在声纳属性文件中指定了源代码和类目录。 The classes folder has several sub directories. classes文件夹有几个子目录。 Whenever I try running the entire project, I end up getting a OutOfMemoryError
. 每当我尝试运行整个项目时,最终都会收到OutOfMemoryError
。 However, if I narrow down the classes directory to one of the sub folders, the project gets analyzed successfully. 但是,如果我将classes目录缩小到一个子文件夹中,则项目将被成功分析。 I tried changing the JVM Xmx
options to no avail. 我尝试将JVM Xmx
选项更改为无济于事。 Please suggest. 请提出建议。
Sonar
will build your project and run Test cases for analyze code based on your rules. Sonar
将构建您的项目并运行测试用例以根据您的规则分析代码。 So if your test cases and build required more memory you will have to provide that. 因此,如果您的测试用例和构建需要更多的内存,则必须提供该内存。 There are several options. 有几种选择。 First one is increase Heap size which you already tried. 第一个是增加您已经尝试过的堆大小。 And also you can clear the build space and rebuild the source. 您还可以清除构建空间并重新构建源。 If you don't want to tun test cases you can skip test cases to save memory. 如果您不想调整测试用例,则可以跳过测试用例以节省内存。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.