Hi ![]()
I’ve just upgraded my Sonar Gradle plugin and the behaviour has changed and I’m not sure how to get it to work, or whether this is a bug.
- which versions are you using (SonarQube Server / Community Build, Scanner, Plugin, and any relevant extension)
- Sonar Scanner Gradle Plugin v7.2.0.6526 (and above)
- Sonar Scanner Gralde Plugin v7.1.0.6387 (and below) works as expected
- how is SonarQube deployed: zip, Docker, Helm
- N/A
- what are you trying to achieve
- Use wildcards in
sonar.coverage.jacoco.xmlReportPaths
- Use wildcards in
- what have you tried so far to achieve this
- Downgrading to previous version
With configuration:
sonarqube {
properties {
property("sonar.coverage.jacoco.xmlReportPaths", "${rootDir}/**/build/reports/kover/report.xml")
}
}
I get this error:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':sonar'.
> Illegal char <*> at index 29: <path>/**/build/reports/kover/report.xml
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':sonar'.
...
Caused by: java.nio.file.InvalidPathException: Illegal char <*> at index 29: <path>/**/build/reports/kover/report.xml
at org.sonarqube.gradle.SonarTask.lambda$filterPaths$8(SonarTask.java:401)
at org.sonarqube.gradle.SonarTask.filterPaths(SonarTask.java:402)
at org.sonarqube.gradle.SonarTask.lambda$filterPathProperties$5(SonarTask.java:377)
at org.sonarqube.gradle.SonarTask.filterPathProperties(SonarTask.java:376)
at org.sonarqube.gradle.SonarTask.run(SonarTask.java:164)
I tried to have a quick look at the diff between versions and saw the addition of java.nio.file for filtering paths, which looks like it’s the culprit. But I’m not sure whether I need to do something different (preferably not avoiding wildcards) or whether wildcards can be resolved before they get to this step, or something else.
Thanks in advance to anyone that can have a more informed look.