Local Java Version is :
java version "11.0.7" 2020-04-14 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.7+8-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.7+8-LTS, mixed mode)
but my project having java version of :
<java.version>1.8</java.version>
During the build I am getting an error :
Exit code: 1 - javadoc: error - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
How to solve without changing java version of pom to Java 11 or downgrading to Java 8?
I believe you might just have faced a relevant JDK issue - JDK-8212233 and also related to JDK-8217177
To solve that, one of the recommendations would be to upgrade the JDK, since the fix doesn't look to me as backported to JDK-11 while going through the comments. But yeah, your current version could just be the one impacted.
Ensure, updating the configuration of the Javadoc plugin to
<configuration>
<source>8</source>
</configuration>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With