From 4a7d58ae5ca60c52e016683b040ad25b0543b481 Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Thu, 31 Oct 2024 16:26:49 +0100 Subject: [PATCH] fix(freemarker): Apply license choices for `NOTICE_DEFAULT` Fixes #8438. Signed-off-by: Sebastian Schuberth --- .../main/resources/templates/plain-text/NOTICE_DEFAULT.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/reporters/freemarker/src/main/resources/templates/plain-text/NOTICE_DEFAULT.ftl b/plugins/reporters/freemarker/src/main/resources/templates/plain-text/NOTICE_DEFAULT.ftl index c2a2fb7ebc52..dda911439fd9 100644 --- a/plugins/reporters/freemarker/src/main/resources/templates/plain-text/NOTICE_DEFAULT.ftl +++ b/plugins/reporters/freemarker/src/main/resources/templates/plain-text/NOTICE_DEFAULT.ftl @@ -97,9 +97,9 @@ ${copyrights?join("\n", "")} are configured not to be included in notice files, and filter all licenses that are contained in the license files already printed above. --] - [#assign licensesFilteredBySource = LicenseView.CONCLUDED_OR_DECLARED_AND_DETECTED.filter(package.license.licenses)] + [#assign resolvedLicenseInfo = LicenseView.CONCLUDED_OR_DECLARED_AND_DETECTED.filter(package.license, package.licenseChoices)] [#assign resolvedLicenses = helper.filterForCategory( - package.licensesNotInLicenseFiles(licensesFilteredBySource), + package.licensesNotInLicenseFiles(resolvedLicenseInfo.licenses), noticeCategoryName )] [#assign isFirst = true]