Skip to content

fix(build): expose module licenses in generated license reports#68

Closed
Ludy87 wants to merge 1 commit into
HubSpot:masterfrom
Ludy87:add_license
Closed

fix(build): expose module licenses in generated license reports#68
Ludy87 wants to merge 1 commit into
HubSpot:masterfrom
Ludy87:add_license

Conversation

@Ludy87

@Ludy87 Ludy87 commented Jul 13, 2026

Copy link
Copy Markdown

Description of Changes

Added Apache License 2.0 metadata to the Maven POM files for:

  • algebra-jackson
  • algebra-testing
  • algebra

This change ensures that the modules' license is detected and displayed.

Previously, no license information was shown for these modules because their POM files did not explicitly declare a license.

Why the license metadata was not detected

com.github.jk1.dependency-license-report derives license information from the Maven metadata of each resolved dependency rather than from the repository's LICENSE file.

The affected module POMs did not contain their own <licenses> section. The Apache 2.0 license was declared only in the parent project POM. Although the plugin supports collecting licenses from parent POMs, this depends on the complete parent POM chain being resolved and interpreted correctly. For these artifacts, that inherited license did not result in usable module-level license metadata, so the modules appeared without a license in checkLicense and generateLicenseReport.

Declaring the Apache 2.0 license directly in every published module POM makes each artifact's metadata self-contained. This allows the plugin to detect the license reliably without depending on parent POM traversal.

@jhaber

jhaber commented Jul 13, 2026

Copy link
Copy Markdown
Member

Although the plugin supports collecting licenses from parent POMs, this depends on the complete parent POM chain being resolved and interpreted correctly.

Isn't this a pre-req for using these dependencies anyway? For example we define dependencyManagement in the HubSpot basepom. If for some reason you can't resolve that, then you wouldn't get the correct transitive dependencies.

For these artifacts, that inherited license did not result in usable module-level license metadata, so the modules appeared without a license in checkLicense and generateLicenseReport.

Unless I'm missing something, this feels like a bug in the license plugin, and we should fix it there rather than adding a bunch of extra stuff to every pom that should be inherited

@Ludy87

Ludy87 commented Jul 13, 2026

Copy link
Copy Markdown
Author

@jhaber

jhaber commented Jul 14, 2026

Copy link
Copy Markdown
Member

Thanks for tracking that down, we can update jinjava to use a newer version of algebra (or you can use dependencyManagement to override the algebra version for a quicker fix)

@jhaber

jhaber commented Jul 14, 2026

Copy link
Copy Markdown
Member

Should be fixed by HubSpot/jinjava#1324

@jhaber jhaber closed this Jul 14, 2026
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.

2 participants