我有一个带聚合器POM和几个子模块的项目:
com.example:root
|- com.example:module-a
|- com.example:module-b
|- com.example:module-c
决定module-b
需要是一个单独的项目,因此目录module-b
被拆分为一个单独的git存储库。
现在我们有两个项目:
com.example:root
|- com.example:module-a
|- com.example:module-c
com.example:module-b
使用SonarQube对 com.example:root
进行了长时间的分析。我使用了maven目标sonar:sonar
。
现在,当我使用SonarQube分析com.example:module-b
时,我收到此错误:
2016.02.16 13:03:24 ERROR [o.s.s.c.t.CeWorkerCallableImpl] Failed to execute task AVLqLZdJf9ZlZw0WwFfK
org.sonar.api.utils.MessageException: Validation of project failed:
o The project "com.example:project-b" is already defined in SonarQube but as a module of project "com.example:root". If you really want to stop directly analysing project "com.example:root", please first delete it from SonarQube and then relaunch the analysis of project "com.example:project-b".
2016.02.16 13:03:24 ERROR [o.s.s.c.t.CeWorkerCallableImpl] Executed task | project=com.example:project-b | id=AVLqLZdJf9ZlZw0WwFfK | time=302ms
事情是,是的,过去com.example:project-b
确实是com.example:root
的一个模块,但现在已经不存在了。我也不想停止分析com.example:root
,我也不想删除它,并且放弃所有历史记录和所有其他模块。
我该如何解决这个问题?
答案 0 :(得分:4)
我们有SonarQube 5.1.2。这就是我试图用我们的版本解决这个问题的方法。如果这个确切的程序不起作用,也许它会给你解决问题的想法,然后我们会改进答案。
module-b
,并提供其他名称 - 也许module-b-old
module-b
分析以查看现在是否有效。还有一个重置链接;不确定那是做什么的。