I've been investigating build failures with java-11-openjdk as
default, and a lot of those failures are attributable to issues with
javadoc generation, in particular with maven-javadoc-plugin.
It looks like maven-javadoc-plugin cannot do dependency resolution
correctly when run on java 11, and hence generating docs fails with
"package foo does not exist" and / or "unresolved symbol bar" errors,
I tried setting `-Xdoclint:none` when generating javadocs, but this
had no effect on the error.
However, I found an easy solution, which was to switch from using
maven-javadoc-plugin to xmvn-javadoc for generating the docs (by
flipping the existing bcond switch in javapackages-tools). From
previous experiments with this option, it only caused minor problems
with 1-2 packages.
With xmvn-javadoc, the number of packages that fails to build on java
11 was reduced drastically - from ~every package that has dependencies
declared in pom.xml to only those that actually have build issues with
java 11 (so, from about ~1000 failing packages to ~250).
Of those remaining ~250 packages, ~125 can be fixed by overriding java
compiler source / target values to 1.8, since they use target java <
1.6 in their build systems, which is no longer supported by javac 11.
I collected those "EasyFix" packages in this ticket:
The other half of build failures are mostly build issues that are
unrelated to the java 11 switch, and only a handful of packages looks
like it actually required code changes (yes, I looked at the build
logs for *all* the failed builds).
I've also set up a COPR for all packages that require java, with
java-1.8.0-openjdk, java-11-openjdk, and javapackages-tools with the
proposed changes + the switch to xmvn-javadoc:
It's set up to automatically run builds in the event commits are
pushed to dist-git or Pull Requests are filed for any of the packages
the COPR contains. So, for any changes to a package, it will
automatically get built against java 11 in the COPR, as well.
TL;DR: I propose we switch to xmvn-javadoc, since it fixes most of the
build issues I see with OpenJDK 11 by default.
Alternatively: If somebody can figure out how to fix generation of
javadocs with maven-javadoc-plugin, that would be great, as that would
be a smaller change than switching the javadoc generator entirely.
What do you think?
I take lack of dissent as silent assent. ;-) Will you be making this change?