You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2019/07/11 02:18:00 UTC

[jira] [Work logged] (CXF-8066) Support Doclet API (JDK13+)

     [ https://issues.apache.org/jira/browse/CXF-8066?focusedWorklogId=275138&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-275138 ]

ASF GitHub Bot logged work on CXF-8066:
---------------------------------------

                Author: ASF GitHub Bot
            Created on: 11/Jul/19 02:17
            Start Date: 11/Jul/19 02:17
    Worklog Time Spent: 10m 
      Work Description: reta commented on pull request #566: CXF-8066: Support Doclet API (JDK13+)
URL: https://github.com/apache/cxf/pull/566
 
 
   The problem
   ===
   Our `java2wadl` plugin uses some part of Javadoc API to extract the documentation pieces from the
   Java classes / methods / parameters. Since OpenJDK13, this API has been removed completely [2], [3]. To support JDK13 and above, we essentially have to rewrite the implementation completely. However, we would face another blocker here: how to support JDK8-11 and JDK13+ at the same time?
   
   The solution
   ===
   Use multi-release JAR. This is exactly the use case this feature has been designed for. So what it means 
   is that `java2wadl` has additional source folder `src/main/java13` with JDK13 implementation. It would be it however there is another subtle complication. 
   
   The complication 
   ===
   For multi-release JAR, the java2wadl has to be build with 2 JDKs (ideally), pre-JDK13 and JDK13, or 
   alternatively by latest JDK13 twice, once for `src/main/java` (using `--release 8`) and once for `src/main/java13` (equivalent to `--release 13`). The issue is that Javadoc-related API comes from `tools.jar`, which is not in scope of javac's `--release` flag, it really needs to be built by JDK8. As the workaround, we could used `--release 9` to mitigate this issue (since `tools.jar` was merged into JDK9+). This is not ideal (see please the next paragraph) but we get JDK13 builds back on track.
   
   The impact
   ===
   As of now, since our release jobs are using JDK8, there is no impact on release artifacts BUT `java2wadl` 
   will fail when used with JDK13+ea builds. When JDK13 is out, we could rely on toolchain plugin to build `java2wadl` with 2 JDKs (`JDK8` and `JDK13`).
   
   I think this is the first real precedent when we have to deal with large features / API removal from JDK, whereas reflection served as very well before. But this is certainly not the last one. 
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 275138)
            Time Spent: 10m
    Remaining Estimate: 0h

> Support Doclet API (JDK13+)
> ---------------------------
>
>                 Key: CXF-8066
>                 URL: https://issues.apache.org/jira/browse/CXF-8066
>             Project: CXF
>          Issue Type: Improvement
>            Reporter: Andriy Redko
>            Assignee: Andriy Redko
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The com.sun.javadoc.* API is gone in JDK 13 and is replaced with Doclet API. As such, the CXF builds are started to fail on JDK13 for
> {noformat}
> cxf-java2wadl-plugin{noformat}
>  Example:
> {noformat}
> [INFO] ------------------------------------------------------------------------
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project cxf-java2wadl-plugin: Fatal error compiling: CompilerException: NullPointerException -> [Help 1]
> [ERROR] 
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR] 
> [ERROR] For more information about the errors and possible solutions, please read the following articles:
> [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
> [ERROR] 
> [ERROR] After correcting the problems, you can resume the build with the command
> [ERROR]   mvn <goals> -rf :cxf-java2wadl-plugin{noformat}
> (by adding the <forceJavacCompilerUse>true</forceJavacCompilerUse> to maven-compiler-plugin it is possible to get the clear error).
> The official migration guide: [https://download.java.net/java/early_access/jdk13/docs/api/jdk.javadoc/jdk/javadoc/doclet/package-summary.html#migration|https://download.java.net/java/early_access/jdk13/docs/api/jdk.javadoc/jdk/javadoc/doclet/package-summary.html#migration).]
> We may need to introduce the multi-release JAR since the Java 8/9/10/11 and 13+ implementation are not compatible.
> Related projects / issues:
>  * maven-javadoc-plugin (is still using the old API): [https://builds.apache.org/job/maven-box/job/maven-javadoc-plugin/job/master]
>  * [https://bugs.openjdk.java.net/browse/JDK-8215608]
>  * [https://jdk.java.net/13/release-notes]
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)