Skip to content

Latest commit

 

History

History
37 lines (27 loc) · 1.55 KB

notice-templates.md

File metadata and controls

37 lines (27 loc) · 1.55 KB

The Notice templates

The NoticeTemplateProcessor enables customization of the generated open source notices with Apache Freemarker templates.

ORT provides two templates that can be used as a base for creating your custom open source notices:

  • default: Prints a summary of all licenses found in the project itself and lists licenses for all dependencies separately.
  • summary: Prints a summary of all licenses found in the project itself and all dependencies.

See the code comments in the templates for how they work.

Command Line

To use one or both of the provided templates pass the template.ids to the NoticeTemplate reporter_

cli/build/install/ort/bin/ort report
  -i [evaluator-output-path]/evaluation-result.yml
  -o [reporter-output-path]
  --report-formats NoticeTemplate,StaticHtml,WebApp
  -O NoticeTemplate=template.id=default,summary

To use one or more custom templates pass the template.paths to the NoticeTemplate reporter:

cli/build/install/ort/bin/ort report
  -i [evaluator-output-path]/evaluation-result.yml
  -o [reporter-output-path]
  --report-formats NoticeTemplate,StaticHtml,WebApp
  -O NoticeTemplate=template.path=[ort-configuration-path]/custom1.ftl,[ort-configuration-path]/custom2.ftl

The template.id and template.path options can be combined to generate multiple notice files.