为什么Gradle//Sonar Jacoco寻找目录并进行投影?

问题描述:

背景:

我们有两个子项目,每个子项目都有许多子项目.根项目是一个空的父项.我们有一个专为flyway插件设计的项目.通常,名称与目录不匹配.对于透视图,settings.gradle是219行,其中大约一半是项目.

We have two subprojects each with many sub-sub-projects. The root project is an empty parent. We have one project that is strictly for the flyway plugin. Often times names do not match directories. For perspective, settings.gradle is 219 lines and roughly half of those are projects.

所以我遇到了这个错误:

So I'm getting this error:

由以下原因引起:java.lang.IllegalStateException:模块':commons:sitewidget'的基本目录不存在:/dev/abc/commons/:commons:sitewidget

Caused by: java.lang.IllegalStateException: The base directory of the module ':commons:sitewidget' does not exist: /dev/abc/commons/:commons:sitewidget

这里是问题:SonarQube Gradle插件如何构建该路径?我的意思是说/dev/abc/commons/:commons:sitewidget不存在.实际路径是/dev/abc/commons/sitewidget.

Here is the question: How did the SonarQube Gradle plugin build that path? By this, I mean /dev/abc/commons/:commons:sitewidget which doesn't exist. The actual path is /dev/abc/commons/sitewidget.

如果我可以找到一种方法来强制它正确构建路径,那么我也许可以解决其他问题.

If I can find a way to force it to build the path correctly, I may be able to work around other issues.

此问题已由 Sonar修复具有> https://jira.sonarsource.com/browse/SONARGRADL-14的源团队 ,并在Gradle插件门户上部署了一个错误修正版本2.0.1.

This has been fixed by the Sonar Source Team with https://jira.sonarsource.com/browse/SONARGRADL-14 and a bugfix release 2.0.1 was deployed on Gradle plugin portal.