Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

package-list cannot be fetched by javadoc 12 #21

Closed
dmitry-timofeev opened this issue Apr 10, 2019 · 7 comments
Closed

package-list cannot be fetched by javadoc 12 #21

dmitry-timofeev opened this issue Apr 10, 2019 · 7 comments

Comments

@dmitry-timofeev
Copy link

dmitry-timofeev commented Apr 10, 2019

Hi,

javadoc 12 cannot fetch "package-list" file, although it is avalable.

It seems that the javadoc tool uses "package-list/" path (which returns an error shown below). The "package-list" works perfectly with the current javadoc.io version:

<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>B04F0F168527EBE7</RequestId><HostId>jdRpinIk9pnOEJcgThwmS3x+WV8DidZ52PQ7y6v0e0Bm5H05U4pgUhmxOh36H1qUnttzqmhe0UM=</HostId></Error>

Would it be possible please to expose "package-list" and similar files used by the javadoc tool to generate links regardless of whether there is a trailing slash /?

@ljnelson
Copy link

ljnelson commented May 9, 2019

Somewhat related: #17 which is closed, but should not be.

@maxcellent
Copy link
Owner

What do you expect to see under url: https://static.javadoc.io/com.google.guava/guava/27.1-jre/package-list/ ?

If you unzip this jar, it doesn't really contain a package-list folder.

http://central.maven.org/maven2/com/google/guava/guava/27.1-jre/guava-27.1-jre-javadoc.jar

@ljnelson
Copy link

I think the original author is trying to say that javadoc up through at least version 8 expects there to be a package-list resource available under either .../package-list or .../package-list/. As simple end users of javadoc and your tool, we have no control over whether this is correct behavior or not, but if you continue to make .../package-list/ be an error case, then it will impact every user of the javadoc tool.

@ljnelson
Copy link

In case it ends up being relevant, here is a link to the source code of javadoc itself that shows how it looks for things:

https://github.com/openjdk/jdk/blob/d62e7f4d2471b4de6c220f20359efae45e9e00ea/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Extern.java#L304-L315

I'll also follow up with a link to the maven-javadoc-plugin which is (in the real world) often responsible for supplying the strings interpreted by this method.

You can see I hope that with later JDKs an attempt is made to read element-list, and if that gives an error then an attempt is made to read package-list.

@dmitry-timofeev
Copy link
Author

@maxcellent

Same as https://static.javadoc.io/com.google.guava/guava/27.1-jre/package-list (no trailing slash) — it appears to be a text file with a list of packages. javadoc 12 requests it with and only with a trailing slash, and fails if this resource cannot be fetched.

@maxcellent
Copy link
Owner

Instead of the one under static.javadoc.io domain, have you tried to use: https://javadoc.io/page/com.google.guava/guava/27.1-jre/package-list/ ?

So that the trailing slash can be properly handled.

I am closing this now. But feel free to reopen if this still doesn't work.

@dmitry-timofeev
Copy link
Author

Thank you, such URL no longer causes a javadoc failure, at least on 13! The bad news is it still errors with no extra info:

# Link in javadoc plugin configuration in POM:

   <link>https://javadoc.io/page/com.google.guava/guava/${guava.version}/package-list/</link>

# Error message (shows a link after redirects. If it is substituted, the same issue occurs):

[WARNING] javadoc: warning - Error fetching URL: https://javadoc.io/static/com.google.guava/guava/28.1-jre/package-list/

That might be an issue in how javadoc utility handles redirects when requesting the resource, because it works for a module published on another web-site which does not redirect, but I haven't investigated further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants