[ https://issues.apache.org/jira/browse/MJAVADOC-732?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17608736#comment-17608736 ]
Konrad Windszus edited comment on MJAVADOC-732 at 9/23/22 1:03 PM: ------------------------------------------------------------------- IIUC m-compiler-p also uses javax.tools (at least optionally, https://github.com/codehaus-plexus/plexus-compiler/blob/master/plexus-compilers/plexus-compiler-javac/src/main/java/org/codehaus/plexus/compiler/javac/JavaxToolsCompiler.java) . The same thing should work for javadoc. I don't know what you meant by "building for Java 7", IMHO executing the Java 7 Javadoc is just not necessary (the output of the tool is poor compared to newer version) so I don't see a use case for still using JDK7 javadoc. Regarding forking: same as for m-compiler-p, in that case it would use the old approach, compare with https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#forceJavacCompilerUse and https://github.com/codehaus-plexus/plexus-compiler/blob/79d1a5fdd237a736ad58fd346a975d5d37046a15/plexus-compilers/plexus-compiler-javac/src/main/java/org/codehaus/plexus/compiler/javac/JavacCompiler.java#L155-L188 was (Author: kwin): IIUC m-compiler-p also uses javax.tools (at least optionally, https://github.com/codehaus-plexus/plexus-compiler/blob/master/plexus-compilers/plexus-compiler-javac/src/main/java/org/codehaus/plexus/compiler/javac/JavaxToolsCompiler.java) . The same thing should work for javadoc. I don't know what you meant by "building for Java 7", IMHO executing the Java 7 Javadoc is just not necessary (the output of the tool is poor compared to newer version) so I don't see a use case for still using JDK7 javadoc. Regarding forking: same as for m-compiler-p, in that case it would use the old approach, compare with https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#forceJavacCompilerUse. > Use javax.tools API for calling javadoc > --------------------------------------- > > Key: MJAVADOC-732 > URL: https://issues.apache.org/jira/browse/MJAVADOC-732 > Project: Maven Javadoc Plugin > Issue Type: Improvement > Components: javadoc > Reporter: Konrad Windszus > Priority: Major > > Currently javadoc is called as external process which makes > consuming/exposing warnings and errors a bit cumbersome and also prevents > proper m2e integration. > As https://openjdk.org/jeps/106 added javadoc support to {{javax.tools}} with > Java 8 it should be safe to adopt that given that m-javadoc-p has been > updated to require Java 8 in MJAVADOC-675 -- This message was sent by Atlassian Jira (v8.20.10#820010)