I'm using maven-javadoc-plugin to produce Javadoc with Java 17. Since there is a class in my code that uses jdk.internal.reflect.Reflection class, Javadoc gives an error. I tried using to pass --add-opens flag but it's no use.
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
<phase>install</phase>
<goals><goal>jar</goal></goals>
</execution>
</executions>
</plugin>
It get the error below.
import jdk.internal.reflect.Reflection;
[ERROR] ^
[ERROR] (package jdk.internal.reflect is declared in module java.base, which does not
export it to the unnamed module)
[ERROR] 1 error
[ERROR]
[ERROR] Command line was: cmd.exe /X /C ""C:\Program Files\Java\jdk-17.0.1\bin\javadoc.exe" @options @packages"