简体   繁体   English

声纳-用新规则分析项目时出现内存不足错误

[英]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.

相关问题 从命令行运行声纳分析时出现链接错误(maven 项目) - Linkage Error on running sonar analysis from command line (maven project) 使用用于整体项目的Spotbugs规则运行声纳扫描仪时遇到错误? - Getting error while running sonar scanner with Spotbugs rules for monolithic project? 在对本机项目运行声纳分析时,得到与sonar.java.binaries属性相关的错误 - On running sonar analysis on react-native project getting error related to sonar.java.binaries property 声纳添加一个新项目 - Sonar Adding a new project 声纳,用于定期分析java maven项目 - sonar for regular analysis of java maven project 使用mvn声纳运行声纳分析:声纳忽略sonar-project.properties - Running sonar analysis with mvn sonar:sonar ignores sonar-project.properties SonarQube分析错误“ SonarQube Scanner执行期间发生错误:请为您的项目的已编译类提供sonar.java.binaries” - SonarQube Analysis Error “Error during SonarQube Scanner execution : Please provide compiled classes of your project with sonar.java.binaries” 声纳分析导致0个文件通过Jenkins在Maven项目上建立索引 - Sonar analysis causes 0 files indexed on a maven project through Jenkins Sonar 4.2在同一个项目中分析Java和JavaScript - Sonar 4.2 analysis both Java and JavaScript in same project 如何通过声纳皮棉中的远程服务器分析本地项目 - how to analysis local project through remote server in sonar lint
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM