On 04/18/2016 09:52 AM, Robert Scholte wrote:
Hi,
in preparation of the DevoxxFr talk about Maven and Java9 by Hervé
Boutemy and Arnaud Héritier I noticed some issues with custom taglets
when generation Javadoc reports.
For the developers of Maven plugins we have a set of Annotations or
DocletTags[1] to generate the plugin descriptor.
The taglets are based on com.sun.tools.doclets.Taglet, but when trying
to run this with Java 9-ea+113 I get the following exception.
Caused by: org.apache.maven.plugin.MojoExecutionException: An error
has occurred in JavaDocs report generation:
Exit code: 1 - javadoc: error - Error - Exception
java.lang.ClassCastException thrown while trying to register Taglet
org.apache.maven.tools.plugin.javadoc.MojoAggregatorTypeTaglet...
What's the preferred way to write custom Taglets when using Java9 and
will this also work with older versions of Java?
thanks,
Robert
[1]
https://maven.apache.org/components/plugin-tools/maven-plugin-tools-javadoc/
Hi Robert,
javadoc in JDK 9 is affected both by JIgsaw, and by the change to use a
new doclet API, JEP 221, with a relatively complicated compatibility
strategy going forward.
http://openjdk.java.net/jeps/221
In this case, it looks like you are using the new version of javadoc,
with the new standard doclet, but using an old-world Taglet. That should
definitely be supported, and it looks like a bug that it is not.
I have filed
JDK-8154482: new doclet should support old taglets
https://bugs.openjdk.java.net/browse/JDK-8154482
-- Jon