You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (JIRA)" <ji...@apache.org> on 2019/01/03 12:33:00 UTC

[jira] [Comment Edited] (MJAVADOC-561) Not possible to link to JDK classes since Java 11

    [ https://issues.apache.org/jira/browse/MJAVADOC-561?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16732979#comment-16732979 ] 

Michael Osipov edited comment on MJAVADOC-561 at 1/3/19 12:32 PM:
------------------------------------------------------------------

Here is a modified version of the {{@options}} file:

{noformat}
-encoding
'UTF-8'
-public
-sourcepath
'C:/Users/mosipov/Documents/testcase/src/main/java'
-author
-bottom
'Copyright &#169; 2019. All rights reserved.'
-charset
'UTF-8'
-d
'C:/Users/mosipov/Documents/testcase/target/site/apidocs'
-docencoding
'UTF-8'
-doctitle
'javadoc-link-to-jdk 1.0-SNAPSHOT API'
-link
'https://docs.oracle.com/en/java/javase/11/docs/api/'
-use
-version
-windowtitle
'title3'
{noformat}

and then run with {{"C:\Program Files\Java\jdk-11.0.1\bin\javadoc.exe" @options @packages}}. It produces invalid output. The module is not taken into account. I read the upsteam issue and the commit. I cannot confirm that this has been properly implemented in {{javadoc(1)}}. Even with the regular {{@options}} with {{-linkoffline}} and an {{element-list}} file it does not work. The bug must be in the tool itself. There seems nothing wrong with this plugin. As sad as it sounds.

There is also no need to provide {{<links />}}, master already supports version 11.


was (Author: michael-o):
Here is a modified version of the {{@options}} file:

{noformat}
-encoding
'UTF-8'
-public
-sourcepath
'C:/Users/mosipov/Documents/testcase/src/main/java'
-author
-bottom
'Copyright &#169; 2019. All rights reserved.'
-charset
'UTF-8'
-d
'C:/Users/mosipov/Documents/testcase/target/site/apidocs'
-docencoding
'UTF-8'
-doctitle
'javadoc-link-to-jdk 1.0-SNAPSHOT API'
-link
'https://docs.oracle.com/en/java/javase/11/docs/api/'
-use
-version
-windowtitle
'title3'
{noformat}

and then run with {{"C:\Program Files\Java\jdk-11.0.1\bin\javadoc.exe" @options @packages}}. It produces invalid output. The module is not taken into account. I read the upsteam issue and the commit. I cannot confirm that this has been properly implemented in {{javadoc(1)}}. Even with the regular {{@options}} with {{-linkoffline}} and an {{element-list}} file it does not work. The bug must be in the tool itself. There seems nothing wrong with this plugin. As sad as it sounds.

> Not possible to link to JDK classes since Java 11
> -------------------------------------------------
>
>                 Key: MJAVADOC-561
>                 URL: https://issues.apache.org/jira/browse/MJAVADOC-561
>             Project: Maven Javadoc Plugin
>          Issue Type: Bug
>          Components: jar
>    Affects Versions: 3.1.0
>            Reporter: Gili
>            Priority: Critical
>         Attachments: testcase.zip
>
>
> 1. Open testcase
> 2. {{mvn javadoc:jar}}
> 3. Notice that generated Javadoc contains broken link to {{java.lang.Number}}
> It doesn't look like one can link to the JDK as of version 11 because the URL structure changed since Java 10.
> Java 10: https://docs.oracle.com/javase/10/docs/api/java/lang/Number.html
> Java 11: https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Number.html
> Please see https://bugs.openjdk.java.net/browse/JDK-8191363 for a related discussion. If any syntax change is required in the pom, please consider updating https://maven.apache.org/plugins/maven-javadoc-plugin/examples/links-configuration.html accordingly.



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