The --no-fonts option breaks the build with JDK 21 after upgrade to v3.11.3 when using toolchain
Affected version
3.11.3
Bug description
I just upgraded from 3.11.2 to 3.11.3, and the build crashed because the flag --no-fonts was being used and not recognised by the javadoc tool.
I'm using Temurin 21.0.8 under Windows 11 x64 with Maven 4.0.0-rc-2.
Adding the option <disableNoFonts>true</disableNoFonts> worked around the issue.
can you provide exactly how you have this issue? because there is a test here https://github.com/apache/maven-javadoc-plugin/blob/9333db140f286cc57016f5ba22b7106af7ff64d5/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java#L1993 and the option is activated only from java23. And we have our CI builds from java 8 to 23. I would like to understand how exactly do you have this issue.
I ran into this while running Maven with JDK 25 and using a toolchain for JDK 21. Here's a minimal repro.
Possible solution direction: This plugin uses the java version dictated by the toolchain instead of the java version that was used to run maven?
Possible solution direction: This plugin uses the java version dictated by the toolchain instead of the java version that was used to run maven?
correct see https://github.com/apache/maven-javadoc-plugin/issues/377
Well TBH I'm not sure if it's an issue here as it;s just a matter of configuration.
I consider it to be an issue because this no-fonts is automatically added depending on the used Java version. It is this java version where it is apparently looking at the wrong one to make this conclusion.
I agree you CAN counteract this incorrect feature usage by adding extra configuration, to me that still makes it an issue.
Sure I agree
maybe using some code from https://github.com/apache/maven-jar-plugin/pull/500 ?