The goal is to combine the Download Licenses Mojo of the license-maven-plugin <https://www.mojohaus.org/license-maven-plugin/download-licenses-mojo.html> with Docusaurus in combination with versioned documentation.
Our solution is a folder structure like this
docs/third-party/files/
where
files
may contain downloaded artifacts such as
Apache-2.0.txt
(works) or
MIT.html
(does not work).
This does not work, as plugins such as the
transformLinks
plugin ignore
*.html
files by intention:
It is more than that, though, as
*.html
files are not even copied to the
build/
folder (unless, according to the documentation, they are placed in the
static/
folder).
We tried with a Docusaurus plugin to manually copy the files, but gave up, as this requires (for versioned documentation) to follow the same strategies (like using
next/
folder) as applied by the versioned docs feature.
Note, that controlling the output of the Download Licenses Mojo is possible, but not feasible (e.g., because
<licenseUrlFileNameSanitizers>
or not applied to file extensions).
For now, we just gave up linking HTML files. Supporting it "out of the box" by Docusaurus would be great... or any advice, how to add a Docusaurus plugin to support this.