-Xdoclint unrecognized in JDK16 due to new module
Jonathan Gibbons
jonathan.gibbons at oracle.com
Tue Dec 15 01:36:28 UTC 2020
Ben,
jdk.compiler "uses" a service that "jdk.javadoc" provides, so as long as
"jdk.javadoc"
is available in the image bring executed, I would expect jdk.javadoc to
be linked in.
There is different minor issue that the system could fail in a more
friendly way
when the jdk.javadoc module is not available.
-- Jon
On 12/14/20 12:05 PM, Benjamin Marwell wrote:
> Hello all,
>
> it caught my attention that doclint functionality was moved to the
> jdk.javadoc module [1].
>
> Now, when calling ToolProvider.getSystemJavaCompiler().getTask(…), the
> presence of the option '-Xdoclint:-missing' and similar options will throw
> this exception [2]:
> java.lang.IllegalArgumentException: error: invalid flag:
> -Xdoclint:-missing.
>
> This call is being used in Apache Maven, and the Apache Zookeper project
> already suffers from this issue and reported it upstream [3].
>
> Adding the modules to the maven script 'mvn' did not help. But when calling
> javac as an external tool (i.e. not via ToolProvider in the same process),
> the options are being recognized.
>
> I wonder how the doclint options can be made available to
> the ToolProvider.getSystemJavaCompiler().getTask(…) call again.
> Maven itself (and in this case: the compiler plugin) is, as you know, a
> non-modular project.
>
> Best regards,
> Ben
>
> [1] https://bugs.openjdk.java.net/browse/JDK-8252712
> [2]
> https://github.com/bmarwell/maven-compiler-plugin/runs/1546156526?check_suite_focus=true
> [3] https://bugs.openjdk.java.net/browse/JDK-8253996
More information about the jigsaw-dev
mailing list