Closed msgilligan closed 4 years ago
Agreed, we should just move to the new API as you state in option 1 - option 2 is working in the wrong direction.
I think I might have a similar issue with JDK 11 and the -Xdoclint
option.
It would be nice if we could find a solution as the Hibernate ORM 6 javadoc is now heavily relying on Asciidoclet and we still have a lot of legacy javadoc that needs some fixing thus the use of the -Xdoclint
option (we will fix it eventually but we are not in a good position to right now).
I'm also running into this on Java 11. Specifically I'm seeing that the -author
flag is invalid.
Looks like maybe the "invalid flags" can be worked around by setting useStandardDocletOptions
to false
like so:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${javadoc.version}</version>
<configuration>
<doclet>org.asciidoctor.Asciidoclet</doclet>
<docletArtifact>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoclet</artifactId>
<version>${asciidoclet.version}</version>
</docletArtifact>
<additionalOptions>--base-dir ${basedir}</additionalOptions>
+ <useStandardDocletOptions>false</useStandardDocletOptions>
+ <doclint>none</doclint>
</configuration>
</plugin>
With that set, I now get a java.lang.NoSuchMethodError: com.sun.tools.doclets.standard.Standard.validOptions([[Ljava/lang/String;Lcom/sun/javadoc/DocErrorReporter;)Z
from org.asciidoctor.asciidoclet.StandardAdapter.validOptions(StandardAdapter.java:38)
(asciidoclet version 1.5.6) which I guess is a hint at the API problem mentioned in the issue description.
It seems like we've decided to move to the new JavaDoc API (Issue #71) and we have a PR for it (PR #96) so I'm going to close this issue as essentially a duplicate.
When I try to run the current Asciidoclet 1.5.5-SNAPSHOT with Java 10 via the Gradle javadoc task I get the following error:
This is because the old "Standard Doclet" was removed in Java 10 (http://www.oracle.com/technetwork/java/javase/10-relnote-issues-4108729.html#JDK-8177511) and Asciidoclet runs as a preprocessor that in-turn calls the Standard Doclet.
I'm not sure if this is worth trying to fix separately from Issue #71. In other words there are two approaches to resolving this:
So, it seems to me like #71 is probably the best solution. But there may be other solutions and we need to track this specific issue that we are seeing under Java 10+.