in tools/ci/paimon-ci-tools/src/main/java/org/apache/paimon/tools/ci/licensecheck/NoticeFileChecker.java [194:213]
private static int ensureRequiredNoticeFiles(
Map<String, Set<Dependency>> modulesWithShadedDependencies,
Collection<String> modulesWithNoticeFile) {
int severeIssueCount = 0;
Set<String> shadingModules = new HashSet<>(modulesWithShadedDependencies.keySet());
shadingModules.removeAll(modulesWithNoticeFile);
for (String moduleWithoutNotice : shadingModules) {
if (modulesWithShadedDependencies.get(moduleWithoutNotice).stream()
.anyMatch(dependency -> !dependency.getGroupId().equals("org.apache.paimon"))) {
LOG.error(
"Module {} is missing a NOTICE file. It has shaded dependencies: {}",
moduleWithoutNotice,
modulesWithShadedDependencies.get(moduleWithoutNotice).stream()
.map(Dependency::toString)
.collect(Collectors.joining("\n\t", "\n\t", "")));
severeIssueCount++;
}
}
return severeIssueCount;
}