What are the commons practices for licensing a Javadoc JAR file?

Since the Javadoc is automatically generated, is it legally possible to license it under a project-specific license?

Otherwise, how to license the project-specific contents that are included in the Javadoc?

For information, I'm using Gradle as a build tool, it generates the Javadoc as a build task and I would put the license file in the META-INF folder of the Javadoc JAR.


I have a similar requirement and found a solution - see https://github.com/apache/poi/commit/e66486bc8a22c92ad7a21befc452e7786611fdcb

javadocJar {
    metaInf {
  • Thanks for your answer, the code is simpler than what I used to do. Do you also have hints about the legal aspect of licensing Javadoc generated files ?
    – remym19
    Oct 28 '21 at 9:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.