由于内存不足,Sonar maven插件运行失败。我试图在一个模块上运行它来调试一些东西......
[INFO] [16:16:07.709] Execute PMD 5.4.0 done: 10861 ms
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:07 min
[INFO] Finished at: 2015-12-30T16:16:08+01:00
[INFO] Final Memory: 76M/953M
[INFO] ------------------------------------------------------------------------
---------------------------------------------------
constituent[0]: file:/usr/share/maven3/lib/wagon-http-2.6-shaded.jar
[SNIP...]
constituent[39]: file:/usr/share/maven3/conf/logging/
---------------------------------------------------
Exception in thread "main"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "main"
现在,当我尝试在所有模块上运行声纳时,它告诉我:The project 'foo:module1' is already defined in SonarQube but not as a module of project 'foo:aggregator'
但是当我去声纳时:
foo:module1
http://sonar.example/dashboard/index/foo:module1
时,它会将module1
显示为foo:aggregator
module1
。查看我尝试运行分析完成,希望它会添加项目,以便我可以在以后删除它,但我得到了:
[INFO] [17:17:17.805] Execute decorators...
[WARN] [17:17:33.408] Too many components under resource 'module1'. DSM will not be displayed.
[INFO] [17:17:33.526] Store results in database
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 03:19 min
[INFO] Finished at: 2015-12-30T17:17:33+01:00
[INFO] Final Memory: 57M/1044M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.5:sonar (default-cli) on project module1: Unable to save file sources:
[ERROR] ### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '34503e95-81ac-40bb-a73c-60325a11088c' for key 'file_sources_file_uuid_uniq'
[ERROR] ### The error may involve org.sonar.core.source.db.FileSourceMapper.insert-Inline
[ERROR] ### The error occurred while setting parameters
[ERROR] ### SQL: INSERT INTO file_sources (project_uuid, file_uuid, created_at, updated_at, binary_data, line_hashes, data_hash, src_hash) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
[ERROR] ### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '34503e95-81ac-40bb-a73c-60325a11088c' for key 'file_sources_file_uuid_uniq'
我如何删除'来自声纳的foo:module1
,以便我可以在foo:aggregator
答案 0 :(得分:0)
我能做的最好的事情是使用批量删除删除module1
这包含了所有模块的数据。
显然,你可以通过在maven子模块上执行跑步者来管理你的Sonar数据。路要走!