Skip to content

SONARGO-768 Wrong license file for "stax2-api"#110

Merged
mstachniuk merged 7 commits intomasterfrom
SONARGO-768
Mar 17, 2026
Merged

SONARGO-768 Wrong license file for "stax2-api"#110
mstachniuk merged 7 commits intomasterfrom
SONARGO-768

Conversation

@mstachniuk
Copy link
Contributor

No description provided.

@sonar-review-alpha
Copy link

sonar-review-alpha bot commented Mar 17, 2026

Summary

Fixes incorrect license mapping for 'stax2-api' and other dependencies by replacing a hardcoded blacklist with a configurable override system. The change allows projects to specify custom license files for problematic dependencies while providing sensible defaults. License resolution now follows a clear priority: configured overrides → default overrides → packaged license → POM-based lookup.

What reviewers should know

The main logic is in AnalyzerLicensingPackagingRenderer.kt where generateDependencyFile() now checks overrides first before falling back to other methods. The stax2-api fix is in the defaultDependencyLicenseOverrides map (now BSD-2 instead of blacklisted). Note the dependency key format changed from 'group.name' to 'group:name' (Maven convention) throughout. New logging explains which override path was taken for each dependency, and a warning appears when multiple licenses are found in POM data. The Gradle plugin passes the new dependencyLicenseOverrides config through to the renderer.


  • Generate Walkthrough
  • Generate Diagram

🗣️ Give feedback

@mstachniuk mstachniuk changed the title Sonargo 768 SONARGO-768 Wrong license file for "stax2-api" Mar 17, 2026
@mstachniuk mstachniuk closed this Mar 17, 2026
@mstachniuk mstachniuk reopened this Mar 17, 2026
@sonarqube-next
Copy link

@mstachniuk
Copy link
Contributor Author

Copy link
Contributor

@jonas-wielage-sonarsource jonas-wielage-sonarsource left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Nice addition to the licensing :)

@mstachniuk mstachniuk merged commit 26aaaad into master Mar 17, 2026
6 of 7 checks passed
@mstachniuk mstachniuk deleted the SONARGO-768 branch March 17, 2026 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants