When generating with Javadoc with Java 11 or 12 for sources that are Java 9 compatible I get the following output:

Loading source files for package com.foo...
Constructing Javadoc information...
javadoc: error - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/9/docs/api/ are in the unnamed module.
Standard Doclet version 12
Building tree for all the packages and classes...
Generating ....
:
:
:
1 error

This seems inconsistent: either don't create an error or don't generate the javadoc. In this case there's probably a third option worth considering: create an element-list for the online Java 9 docs.
How should this be solved?

Based on the answer I can fix this for the next release of the maven-javadoc-plugin.

thanks,
Robert

Reply via email to