Automating the generation of NOTICE files

ASF projects need to include the correct attributions for the dependencies that they redistribute, in NOTICE files (see the http example).

Creating those NOTICEs is a pain in a multi-module project like Sling, so considering the lazyness is a virtue principle, I decided yesterday to automate this based on the mvn dependency:resolve output.

The resulting mknotice script has been happily generating the millions (almost) of Sling NOTICE files today, and the output is much better than we we had before.

However, the mvn dependency:resolve is not always sufficient. In our dojo extensions modules, for example, the Dojo stuff is copied by Ant tasks run from Maven (which is supposed to be declarative, but that’s another story), without having a dependency at the Maven level.

Also, our Launchpad webapp copies dependencies that are embedded in the launchpad base module using the Maven dependency plugin, which only has a dependency to the launchpad base module, but not on what’s inside, obviously. Another case where the mknotice script fails to provide complete information.

For now, such cases are handled using local module.notice.txt files, to define additional notice entries.

As is often the case when one starts to quickly write a script to fix something, this has taken me much longer than expected. And the script is slow. And a Maven plugin would be better. But hey, it works ;-)

Comments are closed.

%d bloggers like this: