Skip to content

Gradle sonar plugin looking in the wrong directory #421

@adamkorynta

Description

@adamkorynta

When I run the gradle sonar plugin, the GradleDependencyScanner is using the context path to look for the license-details.json file:

This ends up looking in a directory under my gradle project's build/sonar/<gradle-project-name>/build/reports/dependency-license/license-details.json. I tried to configure my JK1 plugin to output to that directory, but it looks like the gradle sonar task cleans the directory prior to running the analylsis.

2024-04-25T17:15:42.300-0700 [DEBUG] [org.sonarqube.gradle.SonarTask] Searching for license file at build\reports\dependency-license\license-details.json
2024-04-25T17:15:42.300-0700 [INFO] [org.sonarqube.gradle.SonarTask] No license-details.json file found in C:\Git\myrepo\build\sonar\myrepo-parent-plugin\build\reports\dependency-license\license-details.json - skipping Gradle dependency scan

I'll note that I have many gradle subprojects and I am running the sonar task on the root project with the same configuration identified in the REAMD.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions