Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty Project Dashboard in SQ7.7 & other issues with 3.0.0-beta-3 #44

Closed
HSSE-Dev opened this issue May 24, 2019 · 7 comments
Closed

Empty Project Dashboard in SQ7.7 & other issues with 3.0.0-beta-3 #44

HSSE-Dev opened this issue May 24, 2019 · 7 comments
Assignees
Labels
Milestone

Comments

@HSSE-Dev
Copy link

Hello,
we use SonarQube 7.7 and SonarQube License Check Plugin 3.0.0-beta-3 to check java licenses und dependencies. "License is not allowed", "Dependency has unknown license" is enabled.
The first problem is, that license check don't use the global license list settings and analyze only for the specific project license specification.
sq_license_Check_issues
Do we have to update the "License Check - Maven Dependencies" for each license?
Because we only find the dependencies which are registered in "License Check - Maven Dependencies":
grafik

Project Dashboard Issue:
We always have an empty project dashboard, but for the same project we get dependencies issue (upperimage).
grafik

Thank for your support

@derkoe
Copy link
Contributor

derkoe commented May 30, 2019

Do we have to update the "License Check - Maven Dependencies" for each license?

No. Under the tab "Licenses" you can define which licenses are globally allowed in your organisation (e.g. Apache-2.0 and MIT). The default is to forbid all licenses - that's why you get those issues.

The Maven Dependencies and Maven Licences tabs are here because Maven has no structured approach to licenses (npm does with SPDX). With Maven Dependencies setting you can map Maven groupId:artifactId matching regex to a license - e.g. "org.apache..*" -> Apache-2.0. With the Maven Licenses setting you can map the string in the license name of the pom.xml to a license - e.g. "Apache.2." -> Apache-2.0.

@derkoe
Copy link
Contributor

derkoe commented May 30, 2019

We always have an empty project dashboard, but for the same project we get dependencies issue

Just tried that with 7.7 and I also get an empty dashboard. I will have a look into this.

@derkoe derkoe added the bug label May 30, 2019
@derkoe derkoe self-assigned this May 30, 2019
@derkoe derkoe added this to the 3.0 milestone May 30, 2019
@derkoe
Copy link
Contributor

derkoe commented May 30, 2019

Seems like SonarQube changed some API semantics with 7.7 - measures on modules are not stored anymore. This breaks the storing of licenses/dependencies.

Not a good practice do break APIs in minor versions ¯\_(ツ)_/¯

See also SonarOpenCommunity/sonar-cxx#1695

@derkoe
Copy link
Contributor

derkoe commented May 30, 2019

This means the License Check project dashboard only works for single module projects in SQ 7.7+.

derkoe added a commit that referenced this issue May 30, 2019
 - SQ 7.7 does not store measures on modules anymore. A workaround
   is implemented that stores the module's data in a static variable.
@tiekuhn
Copy link

tiekuhn commented Jun 3, 2019

Hi @derkoe ,
does your commit reenable support for multi module projects in SQ 7.7+ or will multi module projects no longer be supported ... which would be pretty sad as we have plenty of them :-(

If it re-enables support, do you see any chance to release a new "beta" for v3 including this commit so we can try it out (cause we already are seing the issue also on our end)
THANKS

@derkoe
Copy link
Contributor

derkoe commented Jun 4, 2019

#46 addresses this

@derkoe derkoe closed this as completed in cddcb7c Jun 4, 2019
@HSSE-Dev
Copy link
Author

HSSE-Dev commented Jun 4, 2019

@derkoe Thanks for the quick help and bug fixing, we will test the release soon.
Have a nice week!

fvclaus pushed a commit to fvclaus/sonarqube-licensecheck that referenced this issue Jun 25, 2023
 - SQ 7.7 does not store measures on modules anymore. A workaround
   is implemented that stores the module's data in a static variable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants