in src/main/java/org/apache/creadur/tentacles/Main.java [276:303]
private void reportNotices(final List<Archive> archives) throws IOException {
final Map<Notice, Notice> notices = new HashMap<>();
for (final Archive archive : archives) {
final List<File> noticeDocuments =
this.fileSystem.noticesOnly(archive.contentsDirectory());
for (final File file : noticeDocuments) {
final Notice notice = new Notice(this.ioSystem.slurp(file));
Notice existing = notices.get(notice);
if (existing == null) {
notices.put(notice, notice);
existing = notice;
}
existing.getLocations().add(file);
existing.getArchives().add(archive);
archive.getNotices().add(existing);
}
}
this.templates
.template("legal/notices.vm")
.add("notices", notices.values())
.add("reports", this.reports)
.write(new File(this.layout.getOutputDirectory(),
"notices.html"));
}