porscheinformatik / sonarqube-licensecheck

SonarQube Licensecheck Plugin
Apache License 2.0
159 stars 58 forks source link

License Check page in SonarQube dashboard not showing any licenses #425

Open thomas-eaa opened 3 months ago

thomas-eaa commented 3 months ago

I just tried your plugin and followed all the instructions for the setup in SonarQube. When I start analyzing my project with Maven, it seems to activate the sensor and there are no errors reported:

15:38:20.662 Sensor License Check [licensecheck]
[INFO] 15:38:20.663 Scanning for NPM dependencies (dir=xxx\sandbox_CD_feature_sonarqube\mavenapp)
[INFO] 15:38:20.665 No license-details.json file found in xxx\mavenapp\target\sonar\build\reports\dependency-license\license-details.json - skipping Gradle dependency scan
[INFO] 15:38:20.681 Sensor License Check [licensecheck] (done) | time=19ms

It is a very simple sandbox-project based on Java/Maven with two dependencies in the pom.xml. Anyway, whatever I'm trying to do, the dashboard page in SonarQube is always showing an empty list of licenses and dependencies:

Licenses This is a list of all licenses used in any dependencies listed below. (empty)

Dependencies Here you see all project dependencies from Maven (including transitive) and NPM. Name Version License Status (empty)

Can you please help me out? I tried almost everything but the dependencies are not showing up. Thank you!

hungphaminnomizetech commented 1 month ago

Hi @thomas-eaa, I also have the same issue as you but I fixed it by https://github.com/porscheinformatik/sonarqube-licensecheck?tab=readme-ov-file#activation-rules-in-quality-profile. Please make sure you active rule and dependency, license check

thomas-eaa commented 1 month ago

Hi, thank your for your answer. I double-checked the settings:

The quality profile includes the following rules as active: image

It's also set as default for all projects and appears on the project information page: image

License Check is also activated globally: image

That's why I'm a bit lost at this point. Any ideas? Thank you!

hungphaminnomizetech commented 1 month ago

Hi, In my project I worked with JavaScript and Typescript. I don't know how you can active dependency and license by on my SonarQube, I must create new Quality Profiles name "Sonar way License" extend Javascript and Typescript hihi

After that, I can active dependency and license. And with my project it requires I must install node_module then it will show license and dependency check. haha